Following most guides for installing the Bind (Named) DNS server (even if you install it intuitively just through apt-get with subsequent configuration), the DNS server does not write any logs anywhere. But that's not right, is it? I mean, as long as everything works - fine, but as soon as you need to trace errors - that's where we're stuck.
Let's allow the OS to keep logs for the DNS server.
SolutionBy default, Bind sends its logs to syslog, or more precisely - rsyslog. Which, by default, doesn't expect anything from it and therefore ignores it.
To enable logging, you need to edit the file /etc/rsyslog.conf and add the following block to the end:
/etc/rsyslog.conf:
!named
*.* /var/log/named.log
!-named
After that, restart rsyslog:
$ sudo /etc/init.d/rsyslog restart
And now the logs will appear in /var/log/named.log
Applies to: Debian + Bind
Comments