BIND logging

The following is an example of using the logging statement in BIND's configuration file. Specifically, we want to know which servers are transferring our zones. In this example, we are using BIND 8.3.7 on a Solaris 2.6 system. The logging statement syntax may differ in BIND 9, so be sure to read the BIND 9 Administrator Reference Manual.

We will create a logging channel named log_zone_transfers. We will have all outbound zone transfers logged to a file named axfr.log. Each line in the logfile will contain a timestamp (print-time), category (print-category), and severity (print-severity).

It is recommended that the logging statement appears first in the BIND configuration file.

named.conf entry:

logging {
        channel log_zone_transfers {
                file "axfr.log";
                print-time yes;
                print-category yes;
                print-severity yes;
                };
        category xfer-out { log_zone_transfers; };
};

Example axfr.log entries:

22-Dec-2004 12:58:12.818 xfer-out: info: zone transfer (IXFR) of "zone" (IN) to [192.168.1.100].4068 serial 2004122001 -> 2004122202
22-Dec-2004 12:58:25.545 xfer-out: info: zone transfer (IXFR) of "zone" (IN) to [192.168.1.101].4515 serial 2004121301 -> 2004122202

Back to brandonhutchinson.com.
Last modified: 12/22/2004