Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Apr 16, 2009 11:31 am 
Offline
Senior Newbie

Joined: Tue Feb 10, 2009 12:51 pm
Posts: 9
I have my home system on a cable modem, and my router behind it is running Linux (FreeWRT) with a script that gets called any time my external IP address changes that updates my no-ip account.

What I'd really like to do is use my own domain for this host, rather than no-ip.org, and change my DHCP script to just update the record in my DNS server.

I know BIND can do this, but I chucked BIND a year ago after I saw it was steadily growing to eat 10-20% of the RAM on my Linode, even though I host all of 4 very low-traffic domains. I'm using MaraDNS now, which I very much like, but the only way to add/change a record is to restart the whole server.

I'm looking at a bunch of options, and thought I'd ask the forum what you all are doing. What I've come with so far is:

Option a: continue running Mara as my recursive DNS server, but throw my zone data in LDAP and use ldapdns to resolve my own zones. On the LDAP server, grant write access to only the dynamic hostname(s) zone data, and, on the FreeWRT router, write a script that updates my dynamic IP in LDAP.

Option b: Migrate to Power DNS and use the LDAP backend. I'm looking into PowerDNS, and would particularly like to hear from the forum your impressions of Power DNS vs BIND or Mara, whether you've used the LDAP backend, and how its performance and memory footprint look for a very small site.

Option c: If there's some way I can dynamically push zone data to Linode's DNS system and have it update immediately (TTL notwithstanding), migrate my SOAs to Linode. If there's a way to do this, I'm missing it. Maybe something in the web API?

Option d: Have my script on the router update a file in my Mara config and give it permission to restart Mara. Easy, but viciously ugly, IMO.

Thanks!


Top
   
 Post subject:
PostPosted: Thu Apr 16, 2009 11:34 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
The API can do this. There's an example script in Mike's perl bindings:

http://www.linode.com/api/

http://git.thegrebs.com/?p=WebService-L ... /dyndns.pl

-Chris


Top
   
 Post subject:
PostPosted: Wed Apr 22, 2009 1:51 pm 
Offline
Senior Newbie

Joined: Tue Feb 10, 2009 12:51 pm
Posts: 9
This works perfectly. It was sad putting Mara to sleep after serving me so well for so long, but its time to move forward! :D

One question, I want to know if the domainResourceUodate is successful. I tried

Code:
my $result = $api->domainResourceUpdate(resourceid => $resourceid, target => $pubip); 
print $result;


but that just gave me a number that didn't seem to mean anything.

Currently, I'm doing

Code:
$api->domainResourceUpdate(resourceid => $resourceid, target => $pubip) or die "Failed updating record";
print "$record.$domain updated";


based on the assumption that if there's a problem, the domainResourceUpdate method won't return true. Is there a nicer way to do this?


Top
   
 Post subject:
PostPosted: Fri Apr 24, 2009 3:07 am 
Online
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
You should know that Linode's DNS servers will take up to 15 minutes to reflect changes...


Top
   
 Post subject:
PostPosted: Fri May 01, 2009 1:31 am 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
pratfall wrote:
Is there a nicer way to do this?

I'm not sure about the Perl bindings, but in the response you're looking for something in ERRORARRAY. I tried to modify a resource that didn't belong to me, and ERRORARRAY contained 1 element, which contained a message and an error code.

I assumed this to boil down to "if ERRORARRAY has an element, print the message in element 0 (unless you're running batch) to stderr and die". Not sure how you'd do that with the Perl bindings, though.


Top
   
 Post subject:
PostPosted: Tue Sep 15, 2009 5:01 pm 
Offline
Newbie

Joined: Wed Sep 09, 2009 2:41 pm
Posts: 2
Nothing to add but: this is awesome; you guys are awesome.


Top
   
PostPosted: Wed Sep 16, 2009 2:26 am 
Offline
Junior Member

Joined: Sat Mar 21, 2009 3:45 am
Posts: 48
pratfall wrote:
I have my home system on a cable modem, and my router behind it is running Linux (FreeWRT) with a script that gets called any time my external IP address changes that updates my no-ip account.

What I'd really like to do is use my own domain for this host, rather than no-ip.org, and change my DHCP script to just update the record in my DNS server.


Why not just CNAME the hostname in your domain to whatever the domain name from the dynamic DNS service? That's what I've been doing for years, its simple, and it works.


Top
   
 Post subject: DynDNS with PowerDNS
PostPosted: Tue Nov 09, 2010 4:51 am 
Offline

Joined: Tue Nov 09, 2010 4:45 am
Posts: 1
I think that PowerDNS is a perfect solution for this kind of issues. It comes with MySQL backend and one of the advantages of that is that as soon as you update a record in the database your domain record is updated, no need for a restart of any kind. There is a very simple DynDNS solution for a few domains (not for the public kind of DynDNS service type usage) with source code that you can check out here: DynDNS with PowerDNS. It uses a bit of PHP and a bit of BASH scripting via SSH authenticated using keys. Takes just a few minutes to get rolling on Debian.


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