bind9 log file Ubuntu

to forward log info from syslog to another file for bind9 server in Ubuntu you have to:

  1. add logging section in any name.conf* file:
    logging {
        channel bind_log {
        file "/var/log/named.log";
        print-time yes;
        print-category yes;
        print-severity yes;
        };
        category default { bind_log;};
        category xfer-in { bind_log;};
        category xfer-out { bind_log;};
        category update { bind_log;};
        category security { bind_log;};
        category queries { bind_log;};
    };
    
  2. update apparmor config by adding to file /etc/apparmor.d/usr.sbin.named
     /var/log/named.log rw, 
  3. apparmor_parser -r /etc/apparmor.d/usr.sbin.named
  4. service bind9 restart

Leave a Reply