Remember to use low TTL for the zone which is meant to be updated, 60 seconds seems to be a good value.
DDNS can also be used in conjunction with dhcpd to dynamically update the DNS when a machine is given an IP.
A great setup for situations where the DHCP server is not in your control.
Examples in this article work on RHEL6 that comes with BIND 9. In production environment you’d use encryption keys to secure the access to the DNS server.
is the tool needed to update the IP on the DNS server.
157 29630.private" SERVER="ns.domain.com" LOGFILE="/var/log/syslog" PPP_IFACE="ppp0" if [ "$PPP_LOCAL" ! = "$PPP_IFACE" ]; then echo "$(LANG=C date '%b %e %X') $(hostname) ddupdate[$$]: ABORTED: Not updating dynamic IP \ address $PPP_LOCAL (already done for $(ip addr show $PPP_IFACE | awk '/inet/ '))" An e-mail will alert the system administrator in case the update fails.I recently built an internal DNS/DHCP server which I wanted to support Dynamic DNS updates.This can sometimes be a bit of a challenge depending on the operating system and available packages, but it’s really quite easy on Ubuntu.Server: eth0: 10.0.0.1 static (BIND and DHCPD) eth1: DHCPd assigned (external, different subnet) Client: eth0: DHCP assigned, same subnet as Server eth0 DHCPD Config: authoritative; option domain-name "ops.ss"; option domain-name-servers testvm1ss; ddns-updates on; ddns-update-style interim; default-lease-time 3600; max-lease-time 7200; log-facility local6; key DDNS_UPDATE zone subnet 10.0.0.0 netmask 255.255.255.0 The ddns-hostname statement ddns-hostname name; The name parameter should be the hostname that will be used in set- ting up the client's A and PTR records.If no ddns-hostname is spec- ified in scope, then the server will derive the hostname automati- cally, using an algorithm that varies for each of the different update methods.On the external machine running BIND 9, run as root: DSL provider and still want to host your server at home, you can use third services companies like Dyn or Zonedit.com, but did you know you can set up a secure DDNS service using the BIND DNS server and the nsupdate utility.Still, you need to have control on a machine with a static IP somewhere on the public Internet.In this blogpost we’re going to configure the BIND server to accept dynamic updates.Client machines themselves will send the updates to the DNS server instead of letting DHCP server update the DNS.You can read more on the secure configuration in this excellent article.To allow any client to update the Our virtual machines obtain their IP addresses via DHCP.I also added “allow-update ;” to allow Dynamic DNS updates for these zone (more on that later). ( 2012040233 ; serial 900 ; refresh (15 minutes) 900 ; retry (15 minutes) 604800 ; expire (1 week) 3600 ; minimum (1 hour) ) NS local.I provide a location for the zone files at authoritative; ddns-updates on; ddns-update-style interim; ddns-rev-domainname ""; option domain-name "aohq.local"; option domain-name-servers 192.168.5.200; option ntp-servers ntp.org; ignore client-updates; update-static-leases on; use-host-decl-names on; include "/etc/bind/rndc.key"; zone aohq.local. subnet 192.168.5.0 netmask 255.255.255.0 by default, and associated it with the appropriate zone for DDNS updates. eneth I was able to test that DHCP was working by connecting a new system to the network to receive a static IP address.This article will give you a short introduction to DDNS, and will only apply to a precise example. However, the links provided at the end of the document will allow you further understand the uses that can be made of DDNS.