|
我想dns只对baidu.com及子域名进行递归查询,请问如何设置,下面是我的设置文件!
操作系统:CentOS 5.5
BIND版本:
[root@localhost ~]# rpm -qa bind*
bind-9.3.6-4.P1.el5_4.2
bind-chroot-9.3.6-4.P1.el5_4.2
bind-libs-9.3.6-4.P1.el5_4.2
bind-devel-9.3.6-4.P1.el5_4.2
bind-sdb-9.3.6-4.P1.el5_4.2
bind-libbind-devel-9.3.6-4.P1.el5_4.2
bind-utils-9.3.6-4.P1.el5_4.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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";
allow-query { any; };
allow-query-cache { none; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
//百度域名
zone "baidu.com" IN {
type forward;
forwarders { 202.106.0.20; };
}; |
|