Rolling my own dynamic dns
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!
7 Replies
-Chris
One question, I want to know if the domainResourceUodate is successful. I tried
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
$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?
@pratfall:
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. 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. ERRORARRAY
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.
@pratfall:
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.
DynDNS with PowerDNS