Chinaunix

标题: rhel5.3 的bind使用不稳定问题--急 [打印本页]

作者: shineboy816    时间: 2009-05-25 10:52
标题: rhel5.3 的bind使用不稳定问题--急
大家好,我用rhel5.3的bind搭建DNS服务,不知道为什么使用一段时间后,就不能dns查询了,有时间机器重启就好了:

log如下:
client 192.168.16.250#34127: view airway_tech: no more recursive clients: quota reached
May 25 10:46:09 ns1 named[2160]: client 192.168.16.149#49695: view atech: no more recursive clients: quota reached
May 25 10:46:10 ns1 named[2160]: client 192.168.16.149#52192: view tech: no more recursive clients: quota reached
May 25 10:46:11 ns1 named[2160]: client 192.168.16.149#1592: view tech: no more recursive clients: quota reached
May 25 10:46:12 ns1 named[2160]: client 192.168.16.149#55527: view tech: no more recursive clients: quota reached
May 25 10:46:13 ns1 named[2160]: client 192.168.16.149#64416: view tech: no more recursive clients: quota reached


我用的master/slave模式的dns。
作者: ziggler    时间: 2009-05-25 10:52
标题: 回复 #1 shineboy816 的帖子
这个站点可能有点帮助http://www.cert.org/advisories/CA-1997-22.html
漏洞号是19003
DNS服务器允许通过任意主机发送的Recursive Query(递归质问)。攻击者通过修改DNS主机DNS数据库的内容,企图进行DNS Cache Poisoning(DNS 缓存里加入虚假信息)攻击。攻击者使我们的域名服务器向带有虚假内容的恶意域名服务器执行Recursive Query(递归质问)。此时,我们的服务器会在缓存中保存回应信息中的虚假数据库内容。
需要限制使用域名服务器的主机(即,同一网段的局域网主机)的Recursive Query。

o Unix/Linux 系统:
如果使用Bind 8版本,可以在named.conf文件的'option'部分加入'allow-recursive'命令。如果使用Bind 9版本可以用'allow-recursion'命令。
有必要限制在DNS服务器服务的信息。这些信息包括allow-transfer, allow-query, allow-recursive (或者 allow-recursion)以及版本等选项。Global部分(应用于所有服务Zone)或者per-zone basis中可以限制这些信息。

求助:日志老报no more recursive clients : quota reached - DNS服务器 - ChinaUnix.net (25 May 2009)

http://bbs.chinaunix.net/viewthr ... p;extra=&page=2
作者: scyzxp    时间: 2009-05-25 13:29
原帖由 shineboy816 于 2009-5-25 10:52 发表
大家好,我用rhel5.3的bind搭建DNS服务,不知道为什么使用一段时间后,就不能dns查询了,有时间机器重启就好了:

log如下:
client 192.168.16.250#34127: view airway_tech: no more recursive clients: q ...


recursion yes;
改成
recursion no;
如果没有就加一行到
options {
recursion no;
}
作者: shineboy816    时间: 2009-05-25 14:31
谢谢高手解答。我在named.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";

        // Those options should be used carefully because they disable port
        // randomization
          query-source address 192.168.16.250 port 53;
           forwarders{ 202.103.24.68;202.103.0.117;
                       208.67.222.222;208.67.220.220;};
        // query-source-v6 port 53;
           allow-transfer{ 192.168.16.249;};

        allow-query     { 192.168.16.0/24;10.0.0.0/16;
                          192.168.4.0/24; };
问题暂时解决,请问这句话的意思是不是只让上面这3个网段可以查询我dns,还需求修改哪些配置呢?


作者: shineboy816    时间: 2009-05-27 20:21
今天再次出现上次的问题,clients无法通过dns服务器解析,
登入到dns服务器上,执行命令:nslookup www.sina.com  系统显示无法与dns联系,
但是我输入命令:nslookup www.sina.com 202.103.24.68 却可以解析出来(在named.conf文件中已经设置forwarders 参数)。
机器重启几次都没行,中饭吃完后,服务又莫名其妙的恢复正常。最近几天都是出现这样的状况。请问有高手中的愿意吗?谢谢!!
作者: linux-czq    时间: 2009-05-30 11:39
关注中...! 新手学习中!
作者: shineboy816    时间: 2009-05-30 21:47
顶起来,有高手中的愿意吗?我iptables是disable状态的。dns在内网,有pix防火墙连接出口!!!
作者: polokus    时间: 2009-06-01 00:31
query-source
If the server doesn’t know the answer to a question, it will query other name servers. query-source
specifies the address and port used for such queries.


allow-query
Specifies which hosts are allowed to ask ordinary DNS questions. allow-query may also
be specified in the zone statement, in which case it overrides the options allow-query statement.
If not specified, the default is to allow queries from all hosts
作者: polokus    时间: 2009-06-01 00:37
LZ参考下2楼和3楼的帖子啊
作者: shineboy816    时间: 2009-06-01 11:31
标题: named.conf 配置
root@ns1 etc]# vim named.conf

//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
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";

        // Those options should be used carefully because they disable port
        // randomization
           query-source address 192.168.16.249 port 53;
           forwarders { 202.103.24.68;202.103.0.117;
                      208.67.222.222;};
        // query-source-v6 port 53;
           allow-transfer{ 192.168.16.250;}; (这台为slave,192.168.16.250为maser)

        allow-query     { 192.168.16.0/24;10.0.0.0/24;
                          192.168.4.0/24; };
};
logging {
        category lame-server { null; };
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view tech {
        match-clients      { 192.168.16.0/24;
                             192.168.4.0/24; };
        match-destinations { any; };
        recursion yes;
        include "/etc/named.xxxxxx.net.cn.zones";
};

大家看哈有什么问题,我就是这样配置的,有时出现不能对外查询,但是电信dns可以ping通。
通过命令:nslookup www.sohu.com 202.103.24.68 也可以查询的到!!!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2