Log File location
Troubleshooting DNS issues requires most of the times to take a look at the log file, and for that the first thing you need is to know where the file is located.
/var/named/data/named.run-YYYYMMDD
Log file example
Depending on the time that BINDS has been active and running the log file size can be huge, the following is just an excerpt from my LAB just for you to see how it can look like.
reloading configuration succeeded
reloading zones succeeded
network unreachable resolving './DNSKEY/IN': 2001:503:c27::2:30#53
network unreachable resolving './DNSKEY/IN': 2001:500:12::d0d#53
network unreachable resolving './DNSKEY/IN': 2001:500:1::53#53
network unreachable resolving './DNSKEY/IN': 2001:500:200::b#53
network unreachable resolving './DNSKEY/IN': 2001:500:a8::e#53
network unreachable resolving './DNSKEY/IN': 2001:500:2d::d#53
network unreachable resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53
network unreachable resolving './DNSKEY/IN': 2001:500:2::c#53
network unreachable resolving './DNSKEY/IN': 2001:500:9f::42#53
network unreachable resolving './DNSKEY/IN': 2001:dc3::35#53
network unreachable resolving './DNSKEY/IN': 2001:500:2f::f#53
network unreachable resolving './DNSKEY/IN': 2001:7fe::53#53
network unreachable resolving './DNSKEY/IN': 2001:7fd::1#53
all zones loaded
running
managed-keys-zone: Key 20326 for zone . acceptance timer complete: key now trusted
received control channel command 'stop'
shutting down: flushing changes
stopping command channel on 127.0.0.1#953
stopping command channel on ::1#953
no longer listening on 127.0.0.1#53
no longer listening on 192.168.0.21#53
no longer listening on ::1#53
exiting
Using Tail to see the last X lines
Because logs file can get really big and navigating them becomes a little bit complicated, the use of the “tail” command is mandatory when troubleshooting our DNS.
tail -15 /var/named/data/named.run-20201020