Showing posts from September, 2011

Configuring Logging of Bind DNS in Ubuntu

After installing the Bind9 DNS server in Ubuntu, you might find the need to play with the logging settings. Logging is essential when your trying to figure out why the hell DNS setup is not working as expected. Without any explicit logging configuration (from you or your colleagues) Bind will log messages of the category "default" to "/var/log/syslog". In order to customize the configuration to your own needs try the following steps.

Step 1: Create a new file to write your logs to
The location of this file is up to you, but due to AppArmor restrictions in Ubuntu the easiest strategy is to place it in "/var/log/named". If you need to place it somewhere else you might need to alter your AppArmor configuration.
mkdir /var/log/named
touch /var/log/named/debug.log
touch /var/log/named/query.log
Step 2: Define the configuration
You can place your logging configuration in either "/etc/bind/named.conf" or "/etc/bind/named.conf.local". If there is a b…