DNS Exercise 4.3: Setting up Flexible Logging ============================================= Named logs by default are sent and captured in the /var/log/messages file. Other log messages are by default also sent to the /var/log/messages file. It is possible to change where BIND or named sends its log files. This exercise demonstrates how to change where BIND or named captures its logs. Edit the `/var/named/etc/namedb/named.conf` file and make the following entries just below the options { ...}; section. > logging { > channel default_log { > file "/var/log/named.log" versions 3 size 10m; > print-time yes; > print-category yes; > print-severity yes; > severity info; > }; > > channel xfrs { > file "/var/log/xfer.log" versions 5 size 5m; > print-time yes; > print-category yes; > print-severity yes; > severity info; > }; > > channel qrs { > file "/var/log/queries.log" versions 5 size 5m; > print-time yes; > print-category yes; > print-severity yes; > severity info; > }; > > category default { default_log; }; > category xfer-in { xfrs; }; > category xfer-out { xfrs; }; > category queries { qrs; }; > }; o Restart the BIND/named daemon `/etc/rc.d/named restart`. o Look into the `/var/named/var/log` directory, you should see the following files `named.log`, `queries.log` and `xfer.log`. Now default logging will be to named.log, query logs in the queries.log file, and zone transfer logs will be in xfer.log.