Shammer's Philosophy

My private adversaria

Bind Logging Configuration

Steps

  1. mkdir /var/log/named
  2. chown bind /var/log/named
  3. chgrp bind /var/log/named
  4. generate /etc/bind/named.logging.conf with following content.
  5. add following line to /etc/bind/named.conf
  6. check config with "named-checkconf /etc/bind/named.conf", no output means okay.

Content of /etc/bind/named.logging.conf

logging { 
    channel default-log { 
        file "/var/log/named/default.log"; 
        print-category yes; 
        print-time yes; 
        print-severity yes; 
    }; 
    channel general-log { 
        file "/var/log/named/general.log"; 
        print-category yes; 
        print-time yes; 
        print-severity yes; 
    }; 
    channel database-log { 
        file "/var/log/named/database.log"; 
        print-category yes; 
        print-time yes; 
        print-severity yes; 
    }; 
    category default { 
        "default-log"; 
    }; 
    category general { 
        "general-log"; 
    }; 
    category database { 
        "database-log"; 
    }; 
};

New line which should be added into /etc/bind/named.conf

include "/etc/bind/named.logging.conf"