Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Dynamic DNS Support
PostPosted: Fri Aug 07, 2009 4:58 am 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
Hello. I was a Linode customer from 2003 to 2006. Now I'm considering moving back - I love everything about Linode except the puny disk space, but I'm starting to feel willing to overlook that to get all the rest of the goodness that comes along with a Linode.

One feature I would love to see is dynamic DNS capabilities like zoneedit's. Others have asked for this but I've never seen a response from the Linode.com staff.

Using zoneedit's dynamic dns feature is pretty simple: you just wget a special URL and the request causes an update to the IP address of an entry in your DNS. I have my home server set up to hit this address each time the network comes up.

It woud be great if Linode DNS could do this; unless it can, I will stick with zoneedit. But I'd be much happier to be able to use Linode.com's DNS as well.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 5:36 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
I don't use Linode's DNS myself, but surely it's possible to implement that with a bit of Perl. As long as there isn't a CAPTCHA.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 9:32 am 
Offline
Junior Member

Joined: Tue Dec 09, 2008 2:33 pm
Posts: 49
Website: http://www.ragtop.org
Location: Gilbert, AZ
This would be pretty easy to get working using the API.

Take a look at the API doc at http://www.linode.com/api

The request would look something like this (I haven't tested this):

https://api.linode.com/?api_key=abc123& ... et=1.1.1.1


Top
   
 Post subject: Re: Dynamic DNS Support
PostPosted: Fri Aug 07, 2009 9:45 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
bji wrote:
It woud be great if Linode DNS could do this; unless it can, I will stick with zoneedit. But I'd be much happier to be able to use Linode.com's DNS as well.

Not quite wget, but the Linode API does let you update your DNS resources, so it shouldn't be too hard to script an update process for your home machine.

Alternatively, for maximum flexibility one thing you could consider would be hosting the DNS zone master yourself on your Linode, and then have the Linode DNS configuration slave off of your Linode. This gives you complete control over your zone and you can implement whatever dynamic update methods or features you want yourself, while retaining the redundancy and availability of the the Linode servers.

-- David


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 4:51 pm 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
jsr wrote:
This would be pretty easy to get working using the API.

Take a look at the API doc at http://www.linode.com/api

The request would look something like this (I haven't tested this):

https://api.linode.com/?api_key=abc123& ... et=1.1.1.1


Thanks for the info - I was unaware that the Linode API would support this. I will definitely investigate and if I come up with a general solution, I will post about it in the forms so that others can do the same.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 5:44 pm 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
bji wrote:
jsr wrote:
This would be pretty easy to get working using the API.

Take a look at the API doc at http://www.linode.com/api

The request would look something like this (I haven't tested this):

https://api.linode.com/?api_key=abc123& ... et=1.1.1.1


Thanks for the info - I was unaware that the Linode API would support this. I will definitely investigate and if I come up with a general solution, I will post about it in the forms so that others can do the same.


OK, so the one feature that I think is missing is a parameter for domain.resource.update, something like "UseRequesterIpAsTarget". This parameter would specify that the requesting client's IP address should be used as the target. This is what zoneedit does - you just hit a URL with wget and whatever IP address you came from is used as the IP address for the host in the DNS record.

This is useful because sometimes a client doesn't actually know what its public IP address is. For example, in my home setup, the box in question is NAT'd behind a cable modem that I use port forwarding on to forward ports I care about. My box doesn't actually know what the public IP address of the cable modem is, but since the box is NAT'd by the cable modem, any traffic it initiates will have the cable modem's IP.

Also, as an aside - I appreciate that the Linode API exists, but it really needs to be documented better. The parameters for the request are almost completely undocumented, although often their names "suggest" what they are used for, and the formatting of the Linode API on the web page makes it very difficult to read. To summarize: great API, crappy documentation. Please fix.


Last edited by bji on Fri Aug 07, 2009 6:51 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 6:06 pm 
Offline
Junior Member

Joined: Tue Dec 09, 2008 2:33 pm
Posts: 49
Website: http://www.ragtop.org
Location: Gilbert, AZ
While some option to use the requestor's IP would be easiest, this is nothing that couldn't be solved with some creative scripting.

Use this to get your public IP:

lynx -dump http://www.formyip.com/ | awk "/IP is/{print $NF}"|egrep -o '[0-9.]+'


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 6:50 pm 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
jsr wrote:
While some option to use the requestor's IP would be easiest, this is nothing that couldn't be solved with some creative scripting.

Use this to get your public IP:

lynx -dump http://www.formyip.com/ | awk "/IP is/{print $NF}"|egrep -o '[0-9.]+'


Thank you for the tip. I will use such an idea if Linode isn't willing to or can't implement the feature I have requested. I sure hope Linode does though as it would be nice if everyone can benefit from a single, easy solution to this problem.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 7:14 pm 
Offline
Junior Member

Joined: Mon Nov 21, 2005 4:23 pm
Posts: 46
jsr wrote:
While some option to use the requestor's IP would be easiest, this is nothing that couldn't be solved with some creative scripting.


The automation page linked here: http://whatismyip.com/automation/default.asp will return nothing but you external IP address.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 7:16 pm 
Offline
Junior Member

Joined: Tue Dec 09, 2008 2:33 pm
Posts: 49
Website: http://www.ragtop.org
Location: Gilbert, AZ
BTW, I was playing around, here is a way to put it all into just one simple command.

Code:
wget -qO- "https://api.linode.com/?api_key=abc123&api_action=domain.resource.update&DomainID=5101&ResourceID=18131&Target=`wget -qO- whatismyip.org`"



You can wait and hope Linode develops a solution for you, but if I were you I'd just implement one of the solutions here and be done with it.


Top
   
 Post subject: Another option...
PostPosted: Fri Aug 07, 2009 7:59 pm 
Offline
Senior Member

Joined: Mon Oct 15, 2007 3:11 pm
Posts: 78
Website: http://www.avongauss.com
Location: Boynton Beach, FL
Another option is to use Linode for its hosting and DNS services and use a dynamic DNS provider for the home system.

As an example, lets say the home system has a host name of "bji.dyndns.org" and the home system uses a standard dynamic DNS updater either on the server or your router to keep DynDNS update to date with the address. Using "mydomain.tld" as an example domain, you can create a CNAME record such as "virtual" (virtual.mydomain.tld) that references "bji.dyndns.org".

Sample DNS Entries

mydomain.tld - A Record - (Linode IP address)
www.mydomain.tld - A Record - (Linode IP address)
virtual.mydomain.tld - CNAME Record - bji.dyndns.org


Top
   
 Post subject: Re: Another option...
PostPosted: Sat Aug 08, 2009 3:26 am 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
AVonGauss wrote:
Another option is to use Linode for its hosting and DNS services and use a dynamic DNS provider for the home system.

As an example, lets say the home system has a host name of "bji.dyndns.org" and the home system uses a standard dynamic DNS updater either on the server or your router to keep DynDNS update to date with the address. Using "mydomain.tld" as an example domain, you can create a CNAME record such as "virtual" (virtual.mydomain.tld) that references "bji.dyndns.org".

Sample DNS Entries

mydomain.tld - A Record - (Linode IP address)
www.mydomain.tld - A Record - (Linode IP address)
virtual.mydomain.tld - CNAME Record - bji.dyndns.org


That is a great idea. I researched dyndns but they don't make keeping your dynamic host entry up-to-date any easier than using Linode's API for this purpose in its current form would. dyndns requires that you run an "update client" to update your DNS entry. What I want is something as brain dead simple and elegant as the zoneedit technique of "wget a URL and you're done".

Do you know of another free dynamic DNS provider that supports a zoneedit style of updates?

I still think that this would best and easiest be covered by a simple addition to the Linode DNS API ...


Top
   
 Post subject:
PostPosted: Sat Aug 08, 2009 3:28 am 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
jsr wrote:
BTW, I was playing around, here is a way to put it all into just one simple command.

Code:
wget -qO- "https://api.linode.com/?api_key=abc123&api_action=domain.resource.update&DomainID=5101&ResourceID=18131&Target=`wget -qO- whatismyip.org`"



You can wait and hope Linode develops a solution for you, but if I were you I'd just implement one of the solutions here and be done with it.


What I'd actually do is wait on moving my DNS over to Linode, and leave it on zoneedit. This would make me less happy with Linode service, but not unhappy enough to ditch Linode. But I want to be happy, so I'd prefer that Linode implement this eminently sensible addition to their Linode DNS API!


Top
   
 Post subject: Re: Another option...
PostPosted: Sat Aug 08, 2009 2:12 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
bji wrote:
That is a great idea. I researched dyndns but they don't make keeping your dynamic host entry up-to-date any easier than using Linode's API for this purpose in its current form would. dyndns requires that you run an "update client" to update your DNS entry. What I want is something as brain dead simple and elegant as the zoneedit technique of "wget a URL and you're done".

While they offer clients, I'm pretty sure you can get away with a pure HTTP request manually if you want to. I know I used to do that just with a shortcut in my browser before I gave control over to maintaining the address to my local router (Linksys+Tomato).

It's been a while since I used it, but I've still got the shortcut, and it looks like:
Code:
http://user:password@members.dyndns.org/nic/update?system=dyndns&hostname=xxxx.yyyy&wildcard=NOCHG

Ah, yeah - see http://www.dyndns.com/developers/specs/syntax.html

-- David[/code]


Top
   
 Post subject:
PostPosted: Sat Aug 08, 2009 10:44 pm 
Offline
Junior Member

Joined: Mon Nov 21, 2005 4:23 pm
Posts: 46
Keep in mind though, DynDNS can ban you if you make updates when the IP hasn't changed, so don't make a cron job out of it. Also, they will erase your domain if there's no changes after I believe 30 days.

There's some pre-made shell scripts that take both things into consideration here.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group