參考
http://163.23.94.67/blog/post/2/434
一、安裝DNS所需套件
sudo apt-get install bind9
二、加入正反解檔案設定
sudo vi /etc/bind/named.conf
--------------------------------------------------------------------------------
include "/etc/bind/named.conf.options";
zone "xxx.chc.edu.tw" {
type master;
file "/etc/bind/正解檔檔名";
};
zone "192-255.xx.xx.163.in-addr.arpa" {
type master;
file "/etc/bind/反解檔檔名";
};
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
--------------------------------------------------------------------------------
三、修改bind參數
sudo vi /etc/bind/named.conf.options
在「options {};」內加入
--------------------------------------------------------------------------------
forwarders {
168.95.1.1; 163.23.200.1;
};
allow-query { any; };
allow-transfer { none; };
--------------------------------------------------------------------------------
四、修改正解檔
sudo vi /etc/bind/正解檔檔名
--------------------------------------------------------------------------------
$TTL 43200
@ IN SOA sdes.chc.edu.tw. dns.sdes.chc.edu.tw. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dns.xxxx.chc.edu.tw.
@ IN NS www.xxxx.chc.edu.tw.
@ IN A 163.xxx.xxx.xxx
dns IN A 163.xxx.xxx.xxx
www IN A 163.xxx.xxx.xxx
--------------------------------------------------------------------------------
五、修改反解檔
sudo vi /etc/bind/反解檔檔名
--------------------------------------------------------------------------------
$TTL 43200
@ IN SOA sdes.chc.edu.tw. dns.sdes.chc.edu.tw. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dns.xxx.chc.edu.tw.
65 IN PTR www.xxx.chc.edu.tw.
--------------------------------------------------------------------------------
六、重新啟動 DNS
sudo /etc/init.d/bind9 restart
沒有留言:
張貼留言