Contents ...
udn網路城邦
named.conf ( BIND DNS server 設定範例 )
2008/06/09 14:56
瀏覽2,695
迴響1
推薦0
引用0

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

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

// prime the server with knowledge of the root servers
zone "." {
 type hint;
 file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
 type master;
 file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
 type master;
 file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
 type master;
 file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
 type master;
 file "/etc/bind/db.255";
};
zone "abcd.edu" {
 type master;
 file "/home/knoppix/db.i20";
};

zone "19.168.192.in-addr.arpa" {
 type master;
 file "/home/knoppix/db.19";
};
zone "lupin.idv.tw" {
        type slave;
         file "/home/knoppix/ttu.hosts";
  masters{
   192.168.22.1;
  };
};

-----------------------------------------------------

以下為反向對應檔 db.19 的檔案範例

-----------------------------------------------------

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
         1  ; Serial
    604800  ; Refresh
     86400  ; Retry
   2419200  ; Expire
    604800 ) ; Negative Cache TTL
;
@ IN NS dns.abcd.edu.
41 IN PTR dns.abcd.edu.
41 IN PTR www.abcd.edu.
41 IN PTR ftp.abcd.edu.
41 IN PTR mail.abcd.edu.
41      IN      PTR     w1.abcd.edu.
41      IN      PTR     w2.abcd.edu.
41      IN      PTR     w3.abcd.edu.

---------------------------------------------------
以下為正向對應檔 db.i20 的範例

---------------------------------------------------

;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA abcd.edu. root.abcd.edu. (
         1  ; Serial
    604800  ; Refresh
     86400  ; Retry
   2419200  ; Expire
    604800 ) ; Negative Cache TTL
;
@ IN NS dns.abcd.edu.
dns IN A 192.168.19.41
w1      IN      A       192.168.19.41
w2      IN      A       192.168.19.41
w3      IN      A       192.168.19.41
www IN A 192.168.19.41

ftp IN A 192.168.19.41
mail IN A 192.168.19.41

全站分類:知識學習 其他
自訂分類:Linux
上一則: resolv.conf ( 設定 BIND DNS Server IP 範例 )
迴響(1) :
1樓. yitzchak
2023/11/20 22:30
This is one of the very best and informative blogs that I have come across recently. The fact that it also contains information on Bangkok VM makes it all the more great. Blogs like these aren't easy to find at all.(yitzchak.kerrigan@feerock.com)
發表迴響

會員登入