2015年2月17日 星期二
DNS 內外網段不同解析內容
References :
BIND 9 Configure Views To Partition External and Internal DNS Information
How To Configure BIND as a Private Network DNS Server on Ubuntu 14.04 | DigitalOcean
DNS 將 Domain 分成內外部不同解析(view) - Tsung's Blog
2012年11月20日 星期二
DNS Server - Bind9
加入 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
訂閱:
文章 (Atom)