Friday, 5 September 2008

Howto Dump and view the cache of BIND9 DNS server

Bind 9 makes it fairly easy to dump and view the cache of a caching BIND DNS server. All you have to do is run under root:


rndc dumpdb -cache

This will create a file called named_dump.db in the /var/cache/bind/ directory. You can easily open this .db with your favorite text editor.

** If your instance of BIND is chrooted, for example to /var/lib/named/, then the cache dump file will be located in the /var/lib/named/var/cache/bind/ directory.

** The dumpdb feature of rndc has other options including a -all or -zone flag. Check 'rndc --help' for more information.

0 comments: