repak shawahb
a.k.a. gorgeous gergis

^

   

rsw@jfet.org


blogroll

       
Thu, 26 May 2005

ddns is cool

Now that I'm not going to have a static IP at home, I'm probably going to use dynamic DNS so that positron.jfet.org still points to my home address. It turns out that this is pretty easy with bind9.

The first thing to do is generate yourself a new dnssec key:

[kwantam@positron ~]$ dnssec-keygen -a HMAC-MD5 -b 512 -n HOST positron

This generates two files, one called foo.private and one called foo.key. Take the key (a base64-encoded mess) from the foo.private file and put it in /etc/named.conf on the static machine:

key positron {
        algorithm "hmac-md5";
        secret "<your key here>";
};

Now, in the zone entry for the domain you want to dynamically update, add an appropriate allow-update clause:

zone "jfet.org" {
        type master;
        file "named.jfet.org";

        allow-update {
                key positron;
        };
};

Now you're all set. You can use nsupdate to perform the updates from any client machine on which you have the foo.private and foo.key files:

[kwantam@positron ~]$ nsupdate -k /etc/bind/tsig/foo.private
> update delete positron.jfet.org A
> update add positron.jfet.org 1200 IN A 18.243.0.246
> ^D

For more info, see the dnssec-keygen, nsupdate, and named.conf manpages.


[ permalink | 0 comments (add one you lazy bastard!) ]

writebacks (add one you lazy bastard!)




post a comment:

Save name/email/&c
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key:
(Required)