####视图配置
ip:10.10.54.61
[root@gyf ~]# vim /etc/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; };
recursion yes;
# forward only;
# forwarders{
# 8.8.8.8;
#
# };
acl intranet {10.10.54.0/24;}; ......................增加两行
acl internet {!10.10.54.0/24;any};....................
view "lan" { 。。。。。。。。。。。。。。。。。。。。。。。。。
match-clients{"internet";};。。。。。。。。。。。。。。吻合来源使用下面的zone
zone "." IN {
type hint;
file "named.ca";
};
zone "ssr.com" IN {
type master;
file "named.ssr.com";
allow-transfer{10.10.54.64;};
};
zone "54.10.10.in-addr.arpa" IN {
type master;
file "named.10.10.54";
allow-transfer{10.10.54.64;};
};
};
view “wan” { 。。。。。。。。。。。。。。。。。。。
match-clients {"intranet";}; 。。。。。。。。。。。。。。。。
zone "." IN {
type hint;
file "named.ca";
};
zone "ssr.com" IN{
type master;
file "named.ssr.com.inter";
};
key "rndc-key" {
#####rndc密钥在/etc/rndc.key文件中,可通过key-rndcgen获得
algorithm hmac-md5;
secret "kHBPNCkeyhigyEfp286/yQ==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
转载于:https://my.oschina.net/u/1458120/blog/205474