|
楼主 |
发表于 2009-1-5 20:31:55
|
显示全部楼层
嗯.我的意思大致是这样.view1和view2是对两个特殊的服务器做的acl,它们有特定的解析地址,跟view3里的不一样.
我试着加入了$include 和$origin,但是有问题,请大侠帮我看看:
在zone1下加入了$include后,解析结果好像有问题。具体内容如下,我把named.conf和zone1,zone3的内容帖出来:
named.conf:
-------------------------------------------
acl "zone1" { 192.168.0.43; };
acl "zone2" { 192.168.0.34; };
acl "wan" { any; };
view "internal1" {
match-clients { "zone1"; };
recursion yes;
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "makepolo.com" {
type master;
file "master/zone1";
allow-query { any; };
};
zone "192.168.0.in-addr.arpa" {
type master;
file "master/192.168.0.43.zone";
};
};
-----------------------------------------------
zone1:
--------------------------------------------
$TTL 3600
@ IN SOA dnsmaster.a.com. root.a.com. (
2009010501 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1.a.com.
@ IN NS ns2.a.com.
$include /var/lib/named/master/zone3 a.com.
ns1.a.com. IN A 192.168.0.3
ns2.a.com. IN A 192.168.0.4
*.cn.makepolo.com. IN A 192.168.0.7
*.en.makepolo.com. IN A 192.168.0.8
---------------------------------------------------------
zone3:
--------------------------------------------
$TTL 3600
@ IN SOA dnsmaster.a.com. root.a.com. (
2009010501 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1.a.com.
@ IN NS ns2.a.com.
ns1.a.com. IN A 192.168.0.3
ns2.a.com. IN A 192.168.0.4
ntp.a.com. IN A 192.168.0.66
-----------------------------------------------------------------
按照上面的设置,ntp.a.com能正确解析到192.168.0.66,但zone1里面的*.cn.a.com和*.en.a.com好像解析都有问题,现在有test.cn.a.com这个域名,按照上面的设置,它应当被解析到192.168.0.7才对,可是现在它解析到了:222.51.26.17。222.51.26.17这条解析是我在a.com的zone里的记录,可是我这里明明指定了$include 到zone3的域文件了啊。不知道是什么原因。。。
谢谢各位.. |
|