Configure DHCP for Dynamic DNS CentOS 6
Configure DHCP for Dynamic DNS CentOS 6
At this point we have setup a Dynamic DNS Master Server, and a Dynamic DNS Slave server, but now since we have this configured for Internal DNS, we can also configure DHCP to dynamically add/update addresses to DNS, this is especially handy for new devices, kickstarts, etc.
At this point, as mentioned we are assuming the following:
You have a DDNS Master, if not, click here
You have a Linux DHCP Server, if not, click here
login, and su to root

add the following lines to /etc/dhcp/dhcpd.conf, you can get the rndc secret key from /etc/rndc.key
######################################
# — Allow Dynamic Updates to DNS — #
######################################
ddns-update-style interim;
deny client-updates;
update-static-leases on;
ddns-domainname “test.local”;
key rndc-key {
algorithm hmac-md5;
secret “some-key-ends-in==”;
}
zone test.local {
primary master-server-ip;
key rndc-key;
}
zone 1.168.192.in-addr.arpa. {
primary 127.0.0.1;
key rndc-key;
}
restart DHCP
service dhcpd restart
Fixed Addresses/Reservations:
if you have fixed addresses, you have to add the ddns-hostname parameter, otherwise it will update DNS with the improper forward/reverse DNS names, make sure to set this.
# — Specify DHCP Reservations/Fixed Addresses — #
host somehost.test.local {
hardware ethernet 00:24:b7:d8:9g:e0;
fixed-address 192.168.1.103;
ddns-hostname “somehost”;
}
restart DHCP to verify the new parameters are correct
That’s it!
Hosted Linux Servers at www.zwiegnet.com/go
