It is often desirable to customize DNS logging to collect and organize statitistics and usage information. You may want to know about attempts to update or transfer zones whether the attempt is successful or not. You may also want to know where queries are coming from and what information is being queried. If you see an excessive number of queries from a particular host you may need to investigate and in severe cases you may need to block access from that host until the problem is resolved.

Here is a sample logging statement that might be used in named.conf. Consult the administrator's reference at www.isc.org for additional details.

Example:

logging {
        channel my_syslog {
                syslog daemon;
                severity info;
                print-time yes;
                print-category yes;
        };
        channel my_file {
                file "logs/dns.logs" versions 3 size 25m;
                severity info;
                print-time yes;
                print-category yes;
        };
        channel my_queries {
                file "logs/queries.logs" versions 3 size 25m;
                severity info;
                print-time yes;
                print-category yes;
        };
        channel my_xfers {
                file "logs/xfers.logs" versions 3 size 25m;
                severity info;
                print-time yes;
                print-category yes;
        };
        channel my_security {
                file "logs/security.logs" versions 3 size 25m;
                severity info;
                print-time yes;
                print-category yes;
        };
        category default { my_syslog; my_file; };
        category queries { my_queries;};
        category xfer-in { my_xfers; };
        category xfer-out { my_xfers; };
        category lame-servers {  my_file; };
        category config {  my_file; };
        category security {  my_security; };
};





You are visitor number 1397