免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1944 | 回复: 2

[DNS] 智能DNS搭建好之后,不在访问列表的IP就找不到域名 [复制链接]

论坛徽章:
0
发表于 2012-07-10 10:38 |显示全部楼层
我搭建了一个智能DNS系统,设置了三个view 分别是cnc、telecom和any并且通过acl访问列表来区分用户的来源IP应该访问哪个WEB服务器。目前的情况是cnc和telecom都可以根据配置去访问到指定的WEB服务器,但是any却不行,只要不在acl访问列表的ip地址访问www.wgw.com域名的时候就会提示找不到域名,很郁闷啊。请大家帮忙看看是不是我哪儿配置错了。下面是named.conf的内容,我的版本是bind-9.7.6-P1
[root@madlinux etc]# cat named.conf
key "rndc-key" {
        algorithm hmac-md5;
        secret "7tx+JbihCfZb0V6oX38s6g==";
};

controls {
        inet 127.0.0.1 port 953
                allow { 127.0.0.1; } keys { "rndc-key"; };
};

include "/var/named/cnc/cnc.acl";;
include "/var/named/telecom/telecom.acl";;

options {
        directory "/var/named";
        pid-file "/var/named/named.pid";
        listen-on port 53 {any;};
        allow-query {any;};
        Recursion yes;
        dump-file "/usr/local/named/data/cache_dump.db";
        statistics-file "/usr/local/named/data/named_stats.txt";
        datasize 40M;
        forwarders
        {
          202.106.0.20;      
        };

};

logging {
channel warning
{ file "/var/log/named/dns_warings" versions 3 size 1240k;
severity warning;
print-category yes;
print-severity yes;
print-time yes;
};
channel general_dns
{ file "/var/log/named/dns_logs" versions 3 size 1240k;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category default { warning; };
category queries { general_dns; };
};

################view configure################

################CNC view######################
view "CNC" {
match-clients {cnc;};

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

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

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

zone "wgw.com" {
type master;
file "cnc/wgw_cnc.zone";
};

            };

###############CNC END################

###############Telecom configure##############
view "Telecom" {
match-clients {telecom; };

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

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

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

zone "wgw.com" {
type master;
file "telecom/wgw_telecom.zone";
};

                };

#####################Telecom END###################

##################ANY configure###################
view "Any" {
match-clients {any;};

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

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

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

zone "wgw.com" {
type master;
file "any/wgw_any.zone";
};
           };

################ANY END########################

论坛徽章:
0
发表于 2012-07-10 11:43 |显示全部楼层
问题找到了,自己结贴是在配置最后那部分
file "any/wgw_any.zone";这里指定路径和文件名与实际的路径不符,程序找不到对应的wgw_any.zone,所以出错!

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
发表于 2012-07-10 15:25 |显示全部楼层
楼主的这个问题只能算是低级失误了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP