緊急求助,關於as 2.1上的DNS配置問題,已經三個星期了
我按照論壇上的精華去配置redhat as 2.1自帶的DNS,但無論怎樣配都出現如何出錯信息
>; mail.chen.com
Server: 172.16.23.9
Address: 172.16.23.9#53
** server can't find mail.chen.com.: SERVFAIL
>; 172.16.23.9
Server: 172.16.23.9
Address: 172.16.23.9#53
** server can't find 9.23.16.172.in-addr.arpa.: SERVFAIL
>;
但我本機卻能正常解析
>; localhost
Server: 172.16.23.9
Address: 172.16.23.9#53
Name: localhost
Address: 127.0.0.1
現在附帖上我的配置文件,請各位高手幫忙看看到底那裡出錯了?
$ more /etc/named.conf
// generated by named-bootconf.pl
options {
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
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "chen.com" IN {
type master;
file "chen.com";
};
zone "23.16.172.in-addr.arpa" IN {
type master;
file "23.16.172";
allow-update { none; };
};
include "/etc/rndc.key";
感覺這個文件應該沒有問題吧?
more /var/named/chen.com
$TTL 86400
@ IN SOA chen.com. root.chen.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@1D IN NS chen.com.
@ 1D IN MX 10 chen.com.
$ORIGIN chen.com.
1D IN A 172.16.23.9
www 1D IN A 172.16.23.9
ns 1D IN A 172.16.23.9
mail 1D IN A 172.16.23.9
#more /var/named/23.16.172
TTL
@ IN SOA ns.chen.com. root.chen.com.(
19997022700;serial
28800; refresh
14400; retry
3600000; expire
@ IN NS chen.com.
1 IN PTR chen.com.
2 IN PRT mail.chen.com.
4 IN PRT ns.chen.com.
應該是上面兩個文件有問題,但我改來改去還是不行.另外請問DNS服務如何重啟,因為我找不到in.named這個文件,一直只能用重啟電腦來重啟,好麻煩.
《解決方案》
緊急求助,關於as 2.1上的DNS配置問題,已經三個星期了
hi ...
1. to restart dns server without reboot the server .
#service named restart ### must login as root user
2. 1st u need to do is confirm the dns server is running , maybe u can off the firewall service 1st. step as below
#service iptables stop
# service named restart
check the dns server is running or not ?
# ps -ef | grep named #if u see more line out from terminal, then dns server should running.
3. to confirm dns can resolve the name -->; ip
# host abc #abc is ur server hostname
4. if error prompt out , solve this problem 1st b4 go to another step.
hope can help u .
i think ur /var/named/chen.com is wrong
NS chen.com ==>; wrong
1. NS xxx ==>; xxx is ur server hostname ,
to get the server hostname , at command prompt type #hostname
this is ur NS xxx
《解決方案》
/var/named/db.example1
$TTL 86400
@ IN SOA server1.example1.com. Root.server1.example1.com. (
2003070401 1H 1M 1W 1D )
IN NS server1.example1.com.
IN A 192.168.0.254
server1是你的主機名