adventures in ddns part 5

Now that we've got things updating DNS records all over the place, how do you keep track of all the records? Since DDNS does not require the zone file to be re-read, that also means it doesn't have to store any new records in the zone file, either. While DNS is running, it does keep track of all the changes in a journal file, but they're not plaintext files and unreadable. [1]

One way is to stop DNS with:

rndc stop

This dumps all the journal info to the zone file. Now you can read the zone file with any editor.

If you don't want to stop DNS (since stopping DNS defeats the purpose of DDNS), you can use the named-checkzone command. This will print the current records of the zone -- even the ones that haven't been written to the zone file yet.

named-checkzone -jqD example.com /path/to/example.com.zonefile

Finally, if your server allows it, you can try doing a zone transfer with dig. This will print all the info, just like named-checkzone.

dig @localhost zone axfr | grep -v ";"

So there you have it -- three different ways to view your DNS records with DDNS.

That ends this series on DDNS. I hope a few people learned something!

[1] If anyone knows of a program or library (specifically Python) to read a journal file, please let me know.

Tags: , , , , , ,