DNS server: BIND

Table of Contents

Configuration
named.conf
Zones
Logging

Logging

by ross at 07:22:30 on October 28, 2011

If there is no logging section in your named.conf, add (this is default log to syslog):

logging {
   category default {
      default_syslog;
      default_debug;
   };
};

If you want logging of everything possible to a file add:

logging {
        category "default" { "debug"; };
        category "general" { "debug"; };
        category "database" { "debug"; };
        category "security" { "debug"; };
        category "config" { "debug"; };
        category "resolver" { "debug"; };
        category "xfer-in" { "debug"; };
        category "xfer-out" { "debug"; };
        category "notify" { "debug"; };
        category "client" { "debug"; };
        category "unmatched" { "debug"; };
        category "network" { "debug"; };
        category "update" { "debug"; };
        category "queries" { "debug"; };
        category "dispatch" { "debug"; };
        category "dnssec" { "debug"; };
        category "lame-servers" { "debug"; };
        channel "debug" {
                file "/var/named/var/log/named.log" versions 10 size 100k;
                print-time yes;
                print-category yes;
        };
};

If you get:

logging channel 'debug' file '/var/named/var/log/named.log': file not found
isc_log_open '/var/named/var/log/named.log' failed: file not found

Replace file "/var/named/var/log/named.log" with file "named.log". The log will end up in /etc/namedb/working.

 

Comments