=======================================
@ /var/log/named-query.log ---- query 紀錄
@正解檔的設定位置,與放置位置因人而異,並沒有強制規定
=======================================
A.INSTALL
apt-get install bind9
B.Configure
1.vi /etc/bind/named/named.conf.local
在最後面加上正解檔的設定&位置
zone "example.net" {
type master;
file "/etc/bind/zone/example.net";
};
2. vi /etc/bind/named/named.conf.option
在最後面加上
forwarders {
168.95.1.1;
168.192.192.1;
};
auth-nxdomain yes; # conform to RFC1035 <-- 從 no 改成 yes
logging {
channel "querylog" { file "/var/log/named-query.log"; print-time yes; };
category queries { querylog; };
};
3.mkdir /etc/bind/zone
vi /etc/bind/zone/example.net
$TTL 86400
@ IN SOA example.net. root.example.net. (
20050215 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS example.net.
ns IN A 220.135.54.25
jaric IN A 220.135.54.25
test IN A 220.135.54.25
4.touch /var/log/named-query.log
chown bind.bind /var/log/named-query.log
5. /etc/init.d/bind9 restart