This tutorial is based on Ubuntu 12.04 LTS, in which I will try to show you that how to configure the DHCP server automatically update the DNS records, when it assigns a new lease to a client on local network.We will use the below network diagram as a base for this tutorial: Before starting this tutorial, you can check my other tutorials to learn that, how i configure DHCP server and Gateway: file and other option, some of the main configurations are mentioned below: For given subnet, we need to define the zones and within the zones, we need to tell the DHCP server which key to use to update the DNS server: Here is a DHCP scope that will be used to assign the IP configuration to the clients: Restart the dhcp service: DHCP server successfully add the client to the forward and reverse zone.

allow-update { key DHCP_UPDATER; }; }; zone "0.168.192.in-addr.arpa" { type master; # Change the path of the database file to the writable copy in /var/lib/bind file "/var/lib/bind/rev.0.162.198.in-addr.arpa"; # Tell this zone that we will allow it to be updated from anyone # that knows the secret specified in the DHCP_UPDATER key.

allow-update { key DHCP_UPDATER; }; };# # Make sure to change the ddns update style to interim: ddns-update-style interim; ignore client-updates; # Overwrite client configured FQHNs ddns-domainname ""; ddns-rev-domainname ""; # option definitions common to all supported networks...

option domain-name "home.lan"; option domain-name-servers lan; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented.

If you have followed the steps in my previous post you might have your zone database files in /etc/bind/zones.

We will start by copying the files so we have a backup remaining if anything goes wrong: 1.1 Copy the zone database files: We now need to add the key to the bind configuration and tell it what zones that we want it to allow updates on. INT; # Important: Replace this key with your generated key.

I’ve included the whole contents of my file here and marked the changes that I’ve made in bold. # Also note that the key should be surrounded by quotes.

3.1 Edit /etc/bind/local: # The secret key used for DHCP updates. secret "asdasddsaasd/dsa=="; }; zone "home.lan" { type master; # Change the path of the database file to the writable copy in /var/lib/bind file "/var/lib/bind/db"; # Tell this zone that we will allow it to be updated from anyone # that knows the secret specified in the DHCP_UPDATER key.

If you use an older version of Ubuntu, then you might want to check out the old guide, that was written for Ubuntu 8.04.

Information The steps in this post shows how to configure the DHCP server to automatically update the DNS records when giving out a new lease to a client computer. Before continuing These steps assumes that you already have a working copy of isc-dhcp-server and bind9 installed.