DNS
Domain Name Service trickery
nsupdate
Command line dynamic DNS
nsupdate is a handy little utility that let's us perform dynamic DNS updates from the command line. Of course we want to secure it with TSIGs.
Generate a key pair using dnssec-keygen and add the allow-update clause where appropriate.
SOA
We can work out the DNS master dynamically, assuming the DNS is carefully maintained:
soa=( $(host -t soa ${DOMAIN}) ) SOA=${soa[4]}
Example
Assuming the public key file in KEY:
nsupdate -k ${KEY} -v <<EOT server ${SOA} zone ${DOMAIN} update delete ${HOSTNAME} A update add ${HOSTNAME} 60 A ${IP4} send EOT
Document Actions