在/etc/named.conf 中增加日志选项
/etc/named.conf中logging 选项,增加以下选项后,系统会在/var/log/named/ 下增加dns-default.log,dns-lamer.log,dns-query.log,dns-security.log,dns-security.log五个文件,同时/var/log/named 路径必须有named的相关权限。
logging {
channel default_log {
file "/var/log/named/dns-default.log" versions 10 size 1m;
severity info;
};
channel lamer_log {
file "/var/log/named/dns-lamer.log" versions 3 size 1m;
severity info;
print-severity yes;
print-time yes;
print-category yes;
};
channel query_log {
file "/var/log/named/dns-query.log" versions 10 size 10m;
severity info;
};
channel security_log {
file "/var/log/named/dns-security.log" versions 3 size 1m;
severity info;
print-severity yes;
print-time yes;
print-category yes;
};
category lame-servers { lamer_log; };
category security{ security_log;};
category queries { query_log;};
category default {default_log;};
};
[@more@]
本文链接:https://www.kinber.cn/post/1327.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: