我已经用日志通道配置了DNS服务器,但日志仍然在写入/var/ log /message文件。
options {
// Default zone file directory for this dns server
directory "/var/named";
// Who can perform queries against this dns server and get answers (default: any)
allow-query { any; };
// Do we permit recursion for our internal hosts, and retrieve data from the cache for them? (default: no)
recursion yes;
listen-on { any; };
// Who can get entire zone files from this dns server (default : none)
allow-transfer {
127.0.0.1;
10.10.100.3;
};
// How many recursive clients does this dns support per second? (the default is 1000)
recursive-clients 100;
// Do we notify zone changes? Prevent DoD attacks (default: no)
notify yes;
// specifies which hosts are allowed to get answers from the cache (default: any)
allow-query-cache { any; };
// Does this server using two or more master servers? (default: yes)
multi-master yes;
// sets the maximum time (in seconds) for which the server will cache negative (NXDOMAIN) answers
max-ncache-ttl 300; //5min
// Hide version number (default: "")
version "";
// bombing sources add here (default: none)
blackhole { none; };
};
logging {
channel bindlog {
file "/var/log/querylog" versions 3 size 5m;
print-time yes;
print-category yes;
print-severity yes;
};
category xfer-out { bindlog;};
category xfer-in { bindlog;};
category security { bindlog;};
};
// we are the master server for gani.com
zone "gani.com" IN {
type master;
file "master/gani.com.frwd.db";
};
zone "100.10.10.in-addr.arpa" IN {
type master;
file "master/gani.com.rev.db";
};发布于 2016-08-15 19:46:59
/var/log/messages通常由syslog守护进程管理,因此很可能您的绑定配置了默认的syslog通道进行日志记录(请参阅“绑定9管理员参考手册”6.2.10.1节)。在测试中,即使:
logging {
category default { default_debug; };
...
};一些绑定启动消息仍被发送到syslog (通过Mac上的MacPorts获得绑定9.10 ),但我不确定您在syslog中看到了哪些日志,以及它们为什么会出现问题。
https://unix.stackexchange.com/questions/303526
复制相似问题