Nsupdate notes

From PrgmrWiki


nsupdate commands in current use:

echo -e "server $DNSSERVER\n prereq nxdomain ${HOST}.$DOMAIN.\n update add ${HOST}.$DOMAIN.       86400 A       ${IP}\nsend"| nsupdate -k $DNSKEYFILE
echo -e "server $DNSSERVER\n prereq nxdomain ${REVIP}\n update add ${REVIP}     86400   PTR     ${HOST}.$DOMAIN.\nsend"| nsupdate -k $DNSKEYFILE


we also need

 echo -e "server $DNSSERVER\n update delete ${HOST}.$DOMAIN.       86400 A\nsend"| nsupdate -k $DNSKEYFILE

(this is actually kinda tricky 'cause sometimes it wants more info. I mean, if there is only one mathing a record this is fine, otherwise, we probably want a dig first to get it right)