Steps
- mkdir /var/log/named
- chown bind /var/log/named
- chgrp bind /var/log/named
- generate /etc/bind/named.logging.conf with following content.
- add following line to /etc/bind/named.conf
- 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"