2011年6月26日 星期日

BIND9 SETTING

/etc/bind

(db.bdsps.chc.edu.tw)
;
; BIND data file for local loopback interface
;
$TTL 604800
$ORIGIN bdsps.chc.edu.tw.

@ IN SOA bdsps.chc.edu.tw. root.bdsps.chc.edu.tw. (
20110516 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS bdsps.chc.edu.tw.
@ IN A 163.23.103.1
@ IN MX 10 bdsps.chc.edu.tw.

dnsvr IN A 163.23.103.1
dnsvr IN MX 20 bdsps.chc.edu.tw.
;
www IN CNAME dnsvr
ftp IN CNAME dnsvr
mail IN CNAME dnsvr

*******************************************************************************
/etc/bind
(db.163.23.103)

;
;BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA bdsps.chc.edu.tw. root.bdsps.chc.edu.tw. (
20110516 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS bdsps.chc.edu.tw.
52 IN PTR bdsps.chc.edu.tw.
52 IN PTR dnsvr.bdsps.chc.edu.tw.
52 IN PTR www.bdsps.chc.edu.tw.
52 IN PTR mail.bdsps.chc.edu.tw.
52 IN PTR ftp.bdsps.chc.edu.tw.


*************************************************************************************
/etc/bind
(named.conf.local)
//
// Do any local configuration here
//

zone "bdsps.chc.edu.tw" {
type master;
file "/etc/bind/db.bdsps.chc.edu.tw";
};

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

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

**************************************************************************************
/etc/bind
(named.conf)

// 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";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";


***********************************************************************************
/etc/bind
(named.conf.options)
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forwarders {
168.95.1.1;
163.23.200.1;
163.23.200.6;
};
allow-query { any; };
allow-transfer { none; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

***********************************************************************************
/etc
(resolv.conf)
# Generated by NetworkManager
domain bdsps.chc.edu.tw
search bdsps.chc.edu.tw
nameserver 163.23.103.1
nameserver 163.23.200.6
nameserver 163.23.200.1
nameserver 168.95.1.1

************************************************************************************

/etc/default/bind9
(bind9)

# run resolvconf?
RESOLVCONF=yes

# startup options for the server
OPTIONS="-u bind"