DNS的視圖功能可以很好的控制客戶端的查詢結果
acl intranet { 192.168.8.0/24; };//定義不同的ACL列表
acl internet { ! 192.168.8.0/24; any; };
view dns1 {//定義視圖
match-clients{ internet; };//匹配客戶端地址列表
match-destinations { any; };
recursion yes;//允許遞歸查詢開關
include "/etc/named.rfc1912.zones";//定義解析域,然後定義不同的數據庫文件
};
view dns2 {
match-clients{ intranet; };
match-destinations { any; };
recursion yes;
zone "example.com" IN {
type master;
file "example1.com.zone";
};
zone "8.168.192.in-addr.arpa" IN {
type master;
file "8.168.192.zone";
};
};
};