加入 zone (測試 Debian 好像也不一定要照規定放在 /etc/bind/named.conf.local)
# vi /etc/bind/named.conf// 正解
zone "yan.world" {
type master;
file "db.yan.example";
};
# vi /var/cache/bind/db.yan.example
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA root.yan.example. yan.gmail.com. (
2010080301 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
;@ IN NS localhost.
;@ IN A 127.0.0.1
;@ IN AAAA ::1
@ IN NS yan.example.
yan.example. IN A 127.0.0.1
www 10 IN A 192.168.50.1
www 10 IN A 192.168.50.2
# /etc/init.d/bind9 restart
* 如果 bind9 啟動卻查詢不到,檢查一下 zone 檔與 reverse 檔設定是否正確
# cd /var/cache/bind
// named-checkzone zonename filename
# named-checkzone yan.example db.yan.example
Reference :
Bind9
沒有留言:
張貼留言