WebFaction
Community site: login faq

Hello,

Is this possible and how:

I want to change the IP-adress of a given sub-domain (hosted externally of course) with a call to webfaction's API. Kind of dynamic dns.

Thanks & regards, Stephan

asked 12 May, 06:46

stephan0h
1315
accept rate: 0%


Yes, you can do that using the Create DNS Override function.

If you already have a DNS record for that subdomain, you will need to delete it first.

Something like the following should work on python 2:

import xmlrpclib

username = 'your_username'
password = 'your_password'
machine = 'your_machine'  # Capitalized

subdomain = 'your_subdomain'
current_ip = 'your_current_ip_address'
new_ip = 'your_new_ip_address'

server = xmlrpclib.ServerProxy('https://api.webfaction.com/')
session_id, account = server.login(username, password, machine, 2)

server.delete_dns_override(session_id, subdomain, current_ip)
server.create_dns_override(session_id, subdomain, new_ip)
permanent link

answered 12 May, 07:02

iliasr ♦♦
2.2k14
accept rate: 34%

edited 12 May, 07:03

Super,thank you - will try this!

(13 May, 06:54) stephan0h
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×105
×76
×24

question asked: 12 May, 06:46

question was seen: 204 times

last updated: 13 May, 06:54

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM