Linking Dynamic DNS to DHCP

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;
# example:
# secret “N8Hk2RUFO84bEVl3uGTD2A==”;
zone “home” {
type master;
file “master/db-home”
allow-update { key dhcpupdate; };

zone “” {
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 {
primary dns.home;
key dhcpupdate;

zone home {
primary dns;
key dhcpupdater;

subnet netmask {
option domain-name “home”;

One Response so far | Have Your Say!

  1. Stop Fedora from overwriting /etc/resolv.conf - All Sundry  |  March 20th, 2011 at 1:04 pm #

    [...] I run my own local DNS server for DNS caching, and handling the local DHCP domains. [...]

    Stop Fedora from overwriting /etc/resolv.conf – All Sundry - Gravatar

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>