Есть небольшие затруднения в связке FreeBSD 11.0 и BIND 9.9, а именно с записью логов.
Что имеем:
uname -a
Код: Выделить всё
FreeBSD office.gateway 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Thu Apr 6 19:22:31 MSK 2017 root@Gateway:/usr/obj/usr/src/sys/GATEWAY1.0 i386
Код: Выделить всё
BIND 9.9.9-P6 (Extended Support Version) <id:67d38a6>
running on FreeBSD i386 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Thu Apr 6 19:22:31 MSK 2017 root@Gateway:/usr/obj/usr/src/sys/GATEWAY1.0
built by make with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--with-libxml2=/usr/local' '--with-readline=-L/usr/local/lib -ledit' '--with-dlopen=yes' '--sysconfdir=/usr/local/etc/namedb' '--disable-fetchlimit' '--disable-filter-aaaa' '--disable-fixed-rrset' '--without-gost' '--with-idn=/usr/local' '--enable-ipv6' '--disable-largefile' '--disable-newstats' '--without-python' '--disable-querytrace' '--enable-rpz-nsdname' '--enable-rpz-nsip' '--enable-rrl' 'STD_CDEFINES=-DDIG_SIGCHASE=1' '--with-openssl=/usr' '--without-gssapi' '--with-dlz-filesystem=yes' '--enable-threads' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd11.0' 'build_alias=i386-portbld-freebsd11.0' 'CC=cc' 'CFLAGS=-O2 -pipe -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing' 'LDFLAGS= -fstack-protector' 'LIBS=-L/usr/local/lib' 'CPPFLAGS=-DLIBICONV_PLUG -isystem /usr/local/include' 'CPP=cpp'
compiled by CLANG 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)
compiled with OpenSSL version: OpenSSL 1.0.2k-freebsd 26 Jan 2017
linked to OpenSSL version: OpenSSL 1.0.2k-freebsd 26 Jan 2017
compiled with libxml2 version: 2.9.4
linked to libxml2 version: 20904
Код: Выделить всё
# $FreeBSD: releng/9.3/etc/mtree/BIND.chroot.dist 200563 2009-12-15 05:14:39Z dugb $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
/set type=dir uname=bind gname=wheel mode=0755
.
dev mode=0555
..
etc
namedb uname=bind mode=0500
dynamic uname=bind mode=0700
..
master uname=bind mode=0500
..
slave uname=bind mode=0700
..
working uname=bind mode=0700
..
..
..
/set type=dir uname=bind gname=wheel mode=0755
var uname=root
dump
..
log
..
run
named
..
..
stats
..
..
..
Код: Выделить всё
total 8
drw-rw-r-- 2 bind wheel 512 Apr 13 10:49 .
drwxr-xr-x 7 root wheel 1024 Apr 13 03:07 ..
-rw-rw-r-- 1 bind wheel 0 Apr 10 17:16 named-lamers.log
-rw-rw-r-- 1 bind wheel 0 Apr 10 17:15 named-security.log
-rw-rw-r-- 1 bind wheel 0 Apr 10 17:15 named-transfer.log
-rw-rw-r-- 1 bind wheel 0 Apr 13 10:49 named.log
Код: Выделить всё
options {
// All file and path names are relative to the chroot directory,
// if any, and should be fully qualified.
directory "/usr/local/etc/namedb/working";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
// listen-on { 127.0.0.1; };
// listen-on-v6 { ::1; };
disable-empty-zone "255.255.255.255.IN-ADDR.ARPA";
disable-empty-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
/*
forwarders {
10.0.70.1;
};
*/
// forward only;
// include "/usr/local/etc/namedb/auto_forward.conf";
// Access Control Lists
acl internals { 10.0.0.0/24; 192.168.0.0/32; };
acl local { 127.0.0.1; };
acl externals { any; };
.................... вырезаны стандарнтые зоны конфига ....................
zone "gateway" {
type master;
file "/usr/local/etc/namedb/master/gateway";
allow-query { internals; local; };
};
/*
logging {
channel default {
file "/var/log/named/named.log" versions 3 size 2m;
severity info;
print-time yes;
print-category yes;
};
channel security {
file "/var/log/named/named-security.log" versions 3 size 2m;
severity info;
print-time yes;
print-category yes;
};
channel transfer {
file "/var/log/named/named-transfer.log" versions 3 size 2m;
severity info;
print-time yes;
print-category yes;
};
channel lame {
file "/var/log/named/named-lamers.log" versions 3 size 2m;
severity info;
print-time yes;
print-category yes;
};
category default { default; };
category security { security; };
category xfer-in { transfer; };
category xfer-out { transfer; };
category notify { transfer; };
category lame-servers { lame; };
};
*/
Код: Выделить всё
Apr 12 22:09:20 office named[11618]: ----------------------------------------------------
Apr 12 22:09:20 office named[11618]: BIND 9 is maintained by Internet Systems Consortium,
Apr 12 22:09:20 office named[11618]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Apr 12 22:09:20 office named[11618]: corporation. Support and training for BIND 9 are
Apr 12 22:09:20 office named[11618]: available at https://www.isc.org/support
Apr 12 22:09:20 office named[11618]: ----------------------------------------------------
Apr 12 22:09:20 office named[11618]: command channel listening on 127.0.0.1#953
Apr 12 22:09:20 office named[11618]: command channel listening on ::1#953
Apr 12 22:09:20 office named[11618]: isc_file_isplainfile '/var/log/named/named.log' failed: permission denied
Apr 12 22:09:20 office named[11618]: configuring logging: permission denied
Apr 12 22:09:20 office named[11618]: loading configuration: permission denied
Apr 12 22:09:20 office named[11618]: exiting (due to fatal error)
Apr 12 22:09:20 office sancho: /usr/local/etc/rc.d/named: WARNING: failed to start named
