Is per "view" logging possible with bind?

Justin Piszcz jpiszcz at lucidpixels.com
Sat Jan 31 13:31:35 UTC 2009


I have multiple views:

internal
external
localhost

Is it possible instead of seeing this in the logs:
31-Jan-2009 08:27:47.458 client 127.0.0.1#44632: view localhost: query: _policy._domainkey.lists.isc.org IN TXT +
31-Jan-2009 08:28:22.506 client 192.168.0.55#33380: view internal: query: p34.internal.lan IN AAAA +

To separate them out so ALL related logs for the internal view can be
re-directed to a separate logfile?  The same for the localhost view?
Or would the only way to do-- is use syslog-ng or similar?

What I would like:
/var/log/bind/queries-internal.log
/var/log/bind/queries-external.log
/var/log/bind/queries-localhost.log

My current configuration:

// Setup logging for statistical and debugging purposes.
logging {

   // Define channels.
   channel default_file { file "/var/log/bind/default.log" versions 3 size 5m; severity debug; print-time yes; };
   channel general_file { file "/var/log/bind/general.log" versions 3 size 5m; severity debug; print-time yes; };
   channel database_file { file "/var/log/bind/database.log" versions 3 size 5m; severity debug; print-time yes; };
   channel security_file { file "/var/log/bind/security.log" versions 3 size 5m; severity debug; print-time yes; };
   channel config_file { file "/var/log/bind/config.log" versions 3 size 5m; severity debug; print-time yes; };
   channel resolver_file { file "/var/log/bind/resolver.log" versions 3 size 5m; severity debug; print-time yes; };
   channel xfer-in_file { file "/var/log/bind/xfer-in.log" versions 3 size 5m; severity debug; print-time yes; };
   channel xfer-out_file { file "/var/log/bind/xfer-out.log" versions 3 size 5m; severity debug; print-time yes; };
   channel notify_file { file "/var/log/bind/notify.log" versions 3 size 5m; severity debug; print-time yes; };
   channel client_file { file "/var/log/bind/client.log" versions 3 size 5m; severity debug; print-time yes; };
   channel unmatched_file { file "/var/log/bind/unmatched.log" versions 3 size 5m; severity debug; print-time yes; };
   channel queries_file { file "/var/log/bind/queries.log" versions 3 size 5m; severity debug; print-time yes; };
   channel network_file { file "/var/log/bind/network.log" versions 3 size 5m; severity debug; print-time yes; };
   channel update_file { file "/var/log/bind/update.log" versions 3 size 5m; severity debug; print-time yes; };
   channel update-security_file { file "/var/log/bind/update-security.log" versions 3 size 5m; severity debug; print-time yes; };
   channel dispatch_file { file "/var/log/bind/dispatch.log" versions 3 size 5m; severity debug; print-time yes; };
   channel dnssec_file { file "/var/log/bind/dnssec.log" versions 3 size 5m; severity debug; print-time yes; };
   channel lame-servers_file { file "/var/log/bind/lame-servers.log" versions 3 size 5m; severity debug; print-time yes; };
   channel delegation-only_file { file "/var/log/bind/delegation-only.log" versions 3 size 5m; severity debug; print-time yes; };

   // Define categories.
   category default { default_file; };
   category general { general_file; };
   category database { database_file; };
   category security { security_file; };
   category config { config_file; };
   category resolver { resolver_file; };
   category xfer-in { xfer-in_file; };
   category xfer-out { xfer-out_file; };
   category notify { notify_file; };
   category client { client_file; };
   category unmatched { unmatched_file; };
   category queries { queries_file; };
   category network { network_file; };
   category update { update_file; };
   category update-security { update-security_file; };
   category dispatch { dispatch_file; };
   category dnssec { dnssec_file; };
   category lame-servers { lame-servers_file; };
   category delegation-only { delegation-only_file; };

};


Justin.



More information about the bind-users mailing list