Code: Select all | 複製程式碼
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian 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.root-hints";
include "/etc/bind/named.conf.internal-zones";
Code: Select all | 複製程式碼
// add : set ACL entry for local network
acl internal-network {
123.241.40.195;
};
options {
directory "/var/cache/bind";
// add like follows
// add local network set on [acl] section above
// network range you allow to recieve queries from hosts
allow-query { localhost; internal-network; };
// network range you allow to transfer zone files to clients
// add secondary DNS servers if it exist
allow-transfer { localhost; };
// allow recursion
recursion yes;
dnssec-validation auto;
listen-on port 53 { any; };
// if not listen IPV6, change [any] to [none]
listen-on-v6 { none; };
};
Code: Select all | 複製程式碼
// create new
// add zones for your network and domain name
zone "zine-tw.com" IN {
type primary;
file "/etc/bind/zine-tw.com.lan";
allow-update { none; };
};
zone "40.241.123.in-addr.arpa" IN {
type primary;
file "/etc/bind/40.241.123.db";
allow-update { none; };
};
Code: Select all | 複製程式碼
#
# run resolvconf?
RESOLVCONF=no
# startup options for the server
OPTIONS="-u bind -4"
Code: Select all | 複製程式碼
$TTL 86400
@ IN SOA ns1.zine-tw.com. root.zine-tw.com. (
;; any numerical values are OK for serial number
;; recommended : [YYYYMMDDnn] (update date + number)
2026100401 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
;; define Name Server
IN NS ns1.zine-tw.com.
;; define IP address of the domain
IN A 123.241.40.195
;; define Mail Exchanger Server
IN MX 10 mail.zine-tw.com.
;; define each IP address of a hostname
@ IN A 123.241.40.195
www IN A 123.241.40.195
ns1 IN A 123.241.40.195
mail IN A 123.241.40.195
Code: Select all | 複製程式碼
$TTL 86400
@ IN SOA www.zine-tw.com. root.zine-tw.com. (
2026100401 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
;; define Name Server
IN NS ns1.zine-tw.com.
;; define each hostname of an IP address
195 IN PTR zine-tw.com.
195 IN PTR www.zine-tw.com.
195 IN PTR ns1.zine-tw.com.
195 IN PTR mail.zine-tw.com.
Code: Select all | 複製程式碼
# Generated by NetworkManager
search tbcnet.net.tw
nameserver 139.175.1.243
nameserver 8.8.8.8
nameserver 123.241.40.195