配置DNS服务器后,服务器可解析,客户端不能解析。求解

刘布 2010-07-08 09:56:08
如题。
防火墙已经关闭,selinux也disable掉了
配置完DNS服务器后,DNS服务器将自己设置为DNS可以正常解析域名,
但是客户端却无法解析。测试的工具使用的是nslookup。

为什么呢?
...全文
770 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangxueb 2010-12-17
  • 打赏
  • 举报
回复
我靠!一样的问题哈!
我改成了any怎么还是不行呢?
刘布 2010-07-08
  • 打赏
  • 举报
回复
谢谢提醒,已经解决了,我把这段里面的localhost改成any就可以了

view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
改为
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
steptodream 2010-07-08
  • 打赏
  • 举报
回复
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
先备份named.conf 然后把这段去掉
直接把/etc/named.rfc1912.zones里的信息追加到named.conf的最后
然后重启named 再测试一下
刘布 2010-07-08
  • 打赏
  • 举报
回复
设置了的。另外我用nslookup工具检测了的。由于回帖限制,刚才没有贴上来,这个是NSLOOKUP测试结果

客户端的nslookup测试
> server 192.168.192.202
Default Server: [192.168.192.202]
Address: 192.168.192.202

> www.dzs.sc
Server: [192.168.192.202]
Address: 192.168.192.202

*** [192.168.192.202] can't find www.dzs.sc: Query refused
>

服务器端的nslookup测试
[root@OA ~]# nslookup
> server 192.168.192.202
Default server: 192.168.192.202
Address: 192.168.192.202#53
> www.dzs.sc
Server: 192.168.192.202
Address: 192.168.192.202#53

Name: www.dzs.sc
Address: 192.168.192.16
>
steptodream 2010-07-08
  • 打赏
  • 举报
回复
客户端的DNS设置成你这个dns服务器的ip了吗
刘布 2010-07-08
  • 打赏
  • 举报
回复
dzs.sc.zone的配置

$TTL 86400 @ IN SOA OA. hostmaster.
(42 ; serial (d. adams)
3H ;efresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ IN NS OA.
www IN A 192.168.192.16
jwzh IN A 192.168.192.10
jwzh IN A 192.168.192.18
oa IN A 192.168.192.16
zhcx IN A 192.168.192.87
oa.kj.dzs.sc. IN A 192.168.218.8
www.jt.dzs.sc. IN A 192.168.199.12
mail.gaj.dzs.sc. IN A 192.168.192.9
gaj.dzs.sc. IN MX 10 mail.gaj.dzs.sc.
刘布 2010-07-08
  • 打赏
  • 举报
回复
named.rfc1912.zones的配置

zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "dzs.sc" IN{
type master;
file "dzs.sc.zone";
allow-update {none;};
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
刘布 2010-07-08
  • 打赏
  • 举报
回复
我把配置文件贴一下吧
named.caching-nameserver.conf的配置

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
query-source-v6 port 53;
allow-query { any; };
forwarders {192.168.1.10;};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};

19,613

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧