Howto: Test DDNS Updates

Howto test DDNS updates


Use correct DNS backend

Make sure your host uses Samba as backend:

ucr get dns/backend

Step 1

Get a Kerberos Ticket to authenticate the update:

kinit -t /var/lib/samba/private/dns.keytab dns-$(hostname)

Step 2

Update forward zone:

echo -ne "server
update add newhost.$(ucr get domainname) 300 IN A
"| nsupdate -d -g -t15

Step 3

Verify the entry made is successfully:
host testhost.$(ucr get domainname)

Step 4 (optional)

Update reverse zone. Make sure you use the correct reverse-IP address:

echo -ne "server
update add 300 IN PTR testhost.$(ucr get domainname)
"| nsupdate -d -g -t15

Step 5 (optional)

If needed, create a CNAME record:

echo -ne "server
update add newhost2.$(ucr get domainname) 600 CNAME oldhost.multi.ucs
"| nsupdate -d -g -t15

Step 6

Verify entry was updated:

dig -x
dig testhost.$(ucr get domainname)
dig newhost2.$(ucr get domainname)

Further Information

Further examples about how to use nsupdate can be found here.