免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2681 | 回复: 3
打印 上一主题 下一主题

DNS不响应问题请教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-04 17:57 |只看该作者 |倒序浏览
用Bind做了一台DNS服务器,发现在服务器本机上用host或nslookup查询成功,但用其他PC查询失败。

在其他PC上执行nalookup,先反响查询服务器域名,可以成功;但再查询主机地址,服务器不回包。 配置如下,不知道是什么问题。iptables stop掉了。

#named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        allow-query        { any; };
        /*
         * 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";
};

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

zone "ma.com" IN {
        type master;
        file "ma.com.zone";
};

zone "0.0.202.in-addr.arpa" IN {
        type master;
        file "202.0.0.zone";
};

include "/etc/rndc.key";

___________

#ma.com.zone
$TTL        86400
@                        IN SOA        snap.ma.com. root.snap.ma.com. (
                                        42                ; serial (d. adams)
                                        3H                ; refresh
                                        15M                ; retry
                                        1W                ; expiry
                                        1D )                ; minimum

ma.com.                        IN NS        snap.ma.com.
host1                        IN A        202.0.0.110       
host2                        IN A        202.0.0.120
host3                         IN A        202.0.0.130
host4                        IN A        202.0.0.140


___________

#202.0.0.zone

$TTL        86400
@                        IN SOA        snap.ma.com. root.snap.ma.com. (
                                        42                ; serial (d. adams)
                                        3H                ; refresh
                                        15M                ; retry
                                        1W                ; expiry
                                        1D )                ; minimum

@                        IN NS        snap.ma.com.
3.0.0.202.in-addr.arpa.        IN PTR        snap.ma.com.
110                        IN PTR        host1.ma.com.
120                        IN PTR        host2.ma.com.
130                        IN PTR        host3.ma.com.
140                        IN PTR        host4.ma.com.

论坛徽章:
0
2 [报告]
发表于 2008-12-04 18:21 |只看该作者
你把配置文件里关于本地和127的全注释掉!

论坛徽章:
0
3 [报告]
发表于 2008-12-04 20:19 |只看该作者
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

这个如果设置的是正确的不会影响查询的
同时检查客户机的local dns是否正确,而其建议将dns的缓存flushdns清除一下

论坛徽章:
0
4 [报告]
发表于 2008-12-05 08:39 |只看该作者
调试模式启动named,错误一目了然
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP