LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 778|回复: 0

redhatA3上的DNS服务配置不成功?求教!

[复制链接]
发表于 2004-2-17 16:55:35 | 显示全部楼层 |阅读模式
我用redhatA3上自带的bind-9.2.2-21,bind-utils-9.2.2-21和caching-nameserver-7.2-7。本机ip:192.168.0.1,主机名zyl,域名我取的是domain.cxm。

resolv.conf文件如下:
search domain.cxm
nameserver 192.168.0.1

host.conf文件如下:
order bind,hosts

配置文件named.conf,named.192.168.0和named.domain.cxm如下:

####named.conf文件如下:

// generated by named-bootconf.pl
//  
// a caching only nameserver config
//  
options {  
/*
* 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;
directory "/var/named";
};
controls {  
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." {  
type hint;
file "named.ca";
};
zone "localhost" {  
allow-update { none; };
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" {  
allow-update { none; };
type master;
file "named.local";
};
zone "domain.cxm" {  
type master;
file "named.domain.cxm";
};
zone "0.168.192.in-addr.arpa" {  
type master;
file "named.192.168.0";
};
include  "/etc/rndc.key";

####named.192.168.0文件如下:

$TTL 86400
@ IN SOA zyl.domain.cxm. root.domain.cxm. (
1997022728 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; ttl
)


@ IN NS zyl.domain.cxm.

1 IN PTR zyl.domain.cxm.

####named.domain.cxm文件如下:

$TTL 86400
@ IN SOA zyl.domain.cxm. root.domain.cxm. (
20040216 ; serial
10800 ; refresh
900 ; retry
604800 ; expire
86400 ; ttl
)

IN NS zyl
IN MX 10 zyl

zyl IN A 192.168.0.1

www IN  CHAME zyl


我关掉防火墙,service iptables stop
启动DNS,service named start
都没出错!

然后用host测试:
host 127.0.0.1和host 192.168.0.1都成功!
也就是反向域名解析成功!

但是host zyl.domain.cxm和host localhost都失败
提示:
Host zyl.domain.cxm not found:2(servfail)
Host localhost not found:2(servfail)
正向解析失败,用nslookup测试也是一样!

这是为什么呢?请指教!!谢谢!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表