以下是我的設定值:
/etc/named.conf
*****
// generated by named-bootconf.pl
// secret must be the same as in /etc/rndc.conf
key "key" {
algorithm hmac-md5;
secret
"c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
controls {
inet 127.0.0.1 allow { any; } keys { "key"; };
};
options {
pid-file "/var/run/named/named.pid";
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "can.com.tw" {
type master;
file "can.com.tw.hosts";
};
zone "fun.com.tw" {
type master;
file "fun.com.tw.hosts";
};
zone "2.234.234.65.in-addr.arpa" {
type master;
file "65.234.234.2.rev";
};
************************************************
/var/named/fun.hosts的內容
************************************************
$TTL 86400
fun.com.tw. IN SOA fun.com.tw. root.fun.com.tw. (
2003021313 ; Serial
2880 ; Refresh
1440 ; Retry
36000 ; Expire
864 ) ; Minimum
fun.com.tw. IN NS fun.com.tw.
dns.fun.com.tw. IN A 65.234.234.2
fun.com.tw. IN MX 10 fun.com.tw.
fun.com.tw. IN A 65.234.234.2
s2.fun.com.tw. IN A 65.234.234.2
ftp IN CNAME s2
************************************************
/var/named/can.hosts的內容
************************************************
$TTL 86400
can.com.tw. IN SOA fun.com.tw can.com.tw. (
2003021313 ; Serial
2880 ; Refresh
1440 ; Retry
36000 ; Expire
864 ) ; Minimum
can.com.tw. IN NS fun.com.tw.
fun.com.tw IN A 65.234.234.2
can.com.tw. IN A 65.234.234.2
s2.can.com.tw. IN A 65.234.234.2
www IN CNAME s2
ftp IN CNAME s2
************************************************
2.234.234.65.rev
************************************************
$TTL 86400
2.234.234.65.in-addr.arpa. IN SOA fun.com.tw. root.fun.com.tw (
2003021313
10800
3600
604800
38400 )
2.234.234.65.in-addr.arpa. IN NS fun.com.tw.
2.234.234.65.in-addr.arpa. IN PTR mail.fun.com.tw.
2.234.234.65.in-addr.arpa. IN PTR fun.com.tw.
2.234.234.65.in-addr.arpa. IN PTR can.com.tw.
2.234.234.65.in-addr.arpa. IN PTR
www.can.com.tw.
************************************************
似乎並沒什麼錯,/var/log/message的信息沒有警告
DNS還是沒有正常運作