1 Mar, 2011  |  Written by  |  under Uncategorized

I’ve had a few goes at getting dynamic dns name resolution working on my DHCP home network, but could never get it right.

I realised today I really should have it working to make my life much easier with the move to IPv6 shortly, and to get Synergy working with my new computer setup.

A quick search found this excellent page giving the full steps to enable Dynamic DNS with DHCP. Easy to follow instructions and using it I got it all working very quickly.

The only change I had to make was to remove the domain name after ddns-domain-name in dhcpd.conf (thanks Jeffery Forman). Otherwise it gave an error. Works fine without the domain name though.

My Steps

$ dnssec-keygen -a hmac-md5 -b 128 -n USER dhcpupdate
$ cat Kdhcpupdate*.key

edit /etc/named.conf

ddns-update-style interim;
update-static-leases on;

key dhcpupdate {
algorithm hmac-md5;
secret “YOURKEYGOESHERE”;
# example:
# secret “N8Hk2RUFO84bEVl3uGTD2A==”;
};
zone “home” {
type master;
file “master/db-home”
allow-update { key dhcpupdate; };
};

zone “0.168.192.in-addr.arpa” {
type master;
file “master/db-home_rev”;
allow-update { key dhcpupdate; };
};

And editing /etc/dhcp/dhcpd.conf

key dhcpupdate {
algorithm hmac-md5
secret N8Hk2RUFO84bEVl3uGTD2A==;
}

zone 0.168.192.in-addr.arpa {
primary dns.home;
key dhcpupdate;
}

zone home {
primary dns;
key dhcpupdater;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
option domain-name “home”;
ddns-domainname;
….
}