[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bind9 log to an other file (not syslog)



Hello,
I try to use an other file for bind9 logs to keep syslog small.

Based on this
https://wiki.debian.org/Bind9#File_.2Fetc.2Fbind.2Fnamed.conf.log and
http://www.zytrax.com/books/dns/ch7/logging.html I add the following to
the config:

/etc/bind/named.conf
...
include "/etc/bind/named.conf.log"

/etc/bind/named.conf.log

logging {
    channel simple_file {
        file "/var/log/bind/bind.log" versions 3 size 5m;
        severity dynamic;
        print-time yes;
        print-severity yes;
        print-category yes;
    };
    category client { simple_file; };
    category config { simple_file; };
    category database { simple_file; };
    category default { simple_file; };
    category delegation-only { simple_file; };
    category dispatch { simple_file; };
    category dnssec { simple_file; };
    category general { simple_file; };
    category lame-servers { simple_file; };
    category network { simple_file; };
    category notify { simple_file; };
    category queries { simple_file; };
    category resolver { simple_file; };
    category rpz { simple_file; };
    category rate-limit { simple_file; };
    category security { simple_file; };
    category unmatched { simple_file; };
    category update { simple_file; };
    category update-security { simple_file; };
    category xfer-in { simple_file; };
    category xfer-out { simple_file; };
};

partly still loged to syslog like:
(systemd are ok, but no named I think)


Mar 10 11:24:40 pi systemd[1]: Stopping BIND Domain Name Server...
Mar 10 11:24:41 pi systemd[1]: Stopped BIND Domain Name Server.
Mar 10 11:24:47 pi systemd[1]: Starting BIND Domain Name Server...
Mar 10 11:24:47 pi systemd[1]: Started BIND Domain Name Server.
Mar 10 11:24:47 pi named[5756]: starting BIND 9.9.5-9+deb8u5-Raspbian -f
-u bind -4
Mar 10 11:24:47 pi named[5756]: built with '--prefix=/usr'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
Mar 10 11:24:47 pi named[5756]:
----------------------------------------------------
Mar 10 11:24:47 pi named[5756]: BIND 9 is maintained by Internet Systems
Consortium,
Mar 10 11:24:47 pi named[5756]: Inc. (ISC), a non-profit 501(c)(3)
public-benefit
Mar 10 11:24:47 pi named[5756]: corporation.  Support and training for
BIND 9 are
Mar 10 11:24:47 pi named[5756]: available at https://www.isc.org/support
Mar 10 11:24:47 pi named[5756]:
----------------------------------------------------
Mar 10 11:24:47 pi named[5756]: adjusted limit on open files from 4096
to 1048576
Mar 10 11:24:47 pi named[5756]: found 1 CPU, using 1 worker thread
Mar 10 11:24:47 pi named[5756]: using 1 UDP listener per interface
Mar 10 11:24:47 pi named[5756]: using up to 4096 sockets
Mar 10 11:24:47 pi named[5756]: loading configuration from
'/etc/bind/named.conf'
Mar 10 11:24:47 pi named[5756]: reading built-in trusted keys from file
'/etc/bind/bind.keys'
Mar 10 11:24:47 pi named[5756]: using default UDP/IPv4 port range:
[1024, 65535]
Mar 10 11:24:47 pi named[5756]: using default UDP/IPv6 port range:
[1024, 65535]
Mar 10 11:24:47 pi named[5756]: no IPv6 interfaces found
Mar 10 11:24:47 pi named[5756]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 10 11:24:47 pi named[5756]: listening on IPv4 interface eth0,
192.168.178.1#53
Mar 10 11:24:47 pi named[5756]: generating session key for dynamic DNS
Mar 10 11:24:47 pi named[5756]: sizing zone task pool based on 7 zones
Mar 10 11:24:47 pi named[5756]: set up managed keys zone for view
_default, file 'managed-keys.bind'
Mar 10 11:24:47 pi named[5756]: command channel listening on 127.0.0.1#953


oder stuff is loged to "new" logfile, like:

0-Mar-2016 11:24:41.107 general: notice: exiting
10-Mar-2016 11:24:47.635 general: info: managed-keys-zone: loaded serial 3
10-Mar-2016 11:24:47.637 general: info: zone 0.in-addr.arpa/IN: loaded
serial 1
10-Mar-2016 11:24:47.639 general: info: zone 127.in-addr.arpa/IN: loaded
serial 1
10-Mar-2016 11:24:47.641 general: info: zone 255.in-addr.arpa/IN: loaded
serial 1

What can I do to that bind9 is longing completely to "custom" log?


Reply to: