宇泰資訊

Ubuntu Server 8.041 Deb:bind9 (DNS)

張貼日期 2014/10/17 23:35:37
作者 lutuni
Environment (環境)

Operation-System:Ubuntu Server 8.041
Deb:bind9 (DNS)

jonny@ubuntu:~$ sudo apt-get install bind9


Hinet 網域註冊:

DNS Server Name:www.dadiling.com
IP Address:59.125.159.74

DNS Server Name:dns.dadiling.com
IP Address:59.125.159.74



Server Configure (伺服器設定)

1. 加入正反解設定:named.conf 會指出 Server 管轄的區域(Zone)名稱及相關檔案。於 include "/etc/bind/named.conf.local"; 上方加入預新增的設定

jonny@ubuntu:~$ sudo vim /etc/bind/named.conf
...
sudo vim /etc/bind/named.conf.local
//增加正解區域(Zone)

zone "dadiling.com" {
type master;
file "/etc/bind/db.dadiling";
};

//增加反解區域(Zone)
zone "159.125.59.in-addr.arpa" {
type master;
file "/etc/bind/db.159.125.59";
};

include "/etc/bind/named.conf.local";



2. 修改 Bind 參數

1. 備份原始參數

jonny@ubuntu:/etc/bind$ sudo cp named.conf.options named.conf.options.bak


2. 更新參數

jonny@ubuntu:/etc/bind$ sudo vim 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; };
};



3. 建立正解區域設定檔

jonny@ubuntu:/etc/bind$ sudo vim db.dadiling
; BIND reverse data file for local loopback interface

@ IN SOA dlp.dadiling.com. root.dadiling.com. (
2012042701 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)

; define name server

@ IN NS dlp.dadiling.com.

; define name server's IP address

@ IN A 59.125.159.74

; define mail exchanger

@ IN MX 10 dlp.dadiling.com.

; define IP address of a hostname

dlp IN A 59.125.159.74



4. 3. 建立反解區域設定檔

jonny@ubuntu:/etc/bind$ sudo vim db.159.125.59
; BIND reverse data file for local loopback interface

$TTL 604800
@ IN SOA @ root.dns.dadiling.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dns.dadiling.com.
@ IN NS www.dadiling.com.
74 IN PTR dns.dadiling.com.
74 IN PTR www.dadiling.com.




這篇日誌來自 宇泰資訊
http://123.204.89.156/etype

這篇日誌所在的網址(URL)
http://123.204.89.156/etype/modules/weblog/details.php?blog_id=92