在中華電信設定的 domain
www.tnhc.org.tw 60.xxx.xxx.130
dns.tnhc.org.tw 60.xxx.xxx.130

DNS Server(Bind)設定檔路徑 /etc/bind/named.conf
在內容加入正反解:

zone "tnhc.org.tw" {
type master;
file "/etc/bind/named.tnhc";
};
zone "xxx.xxx.60.in-addr.arpa" {
type master;
file "/etc/bind/named.60.xxx.xxx.130";
};


/etc/bind/named.conf.options
先備份這個檔案,再把內容清空(小弟不是很了解這個檔案內容的設定,所以才這樣做)

options {
directory "/var/cache/bind";
forwarders {
168.95.1.1; 139.175.10.20; 203.133.1.6;
};
allow-query { any; };
allow-transfer { none; };
};


增加正解檔案:/etc/bind/named.tnhc
內容:

$TTL 600
@ IN SOA @ root.dns.tnhc.org.tw (
2006103002 ; Serial
28800 ; Refresh
14400 ; Retry
720000 ; Expire
86400 ) ; minimum
;
@ IN NS dns.tnhc.org.tw.
@ IN NS www.tnhc.org.tw.
@ IN MX 10 60.xxx.xxx.130
@ IN A 60.xxx.xxx.130
www IN A 60.xxx.xxx.130


增加反解檔案:/etc/bind/named.60.xxx.xxx.xxx
內容:

$TTL 600
@ IN SOA @ root.dns.tnhc.org.tw. (
1 ; Serial
28800 ; Refresh
14400 ; Retry
720000 ; Expire
86400 ) ; minimum
;
@ IN NS dns.tnhc.org.tw.
@ IN NS www.tnhc.org.tw.
130 IN PTR dns.tnhc.org.tw.
130 IN PTR www.tnhc.org.tw.


目前我還不知道,ubuntu 的 bind 記錄檔會寫到那裡
還有不少的疑問,DNS 這塊真的需要了解更深的知識,不然真的很
難發現問題,每過一座山,又會出現一座更高的山...

參考來源:
鳥哥的 DNS 伺服器設定
UbuntuServerTips Bind
好站: DNS查詢 除錯

20080316 補充資訊(使用 bind9):
apt-get install bind9 dnsutils
http://blog.havenlin.org/index.php/archives/541
arrow
arrow
    全站熱搜

    tern 發表在 痞客邦 留言(2) 人氣()