Dns Bind9:从子网进行限制查询
我有一台linux机器,在172.30.108.0/24网络中有一个WiFi热点分配IP 我已经安装了bind9。 我的named.conf仅包含“include”/etc/bind/named.conf.local”;,其他所有内容都被禁用 我的named.conf.local具有:Dns Bind9:从子网进行限制查询,dns,bind,Dns,Bind,我有一台linux机器,在172.30.108.0/24网络中有一个WiFi热点分配IP 我已经安装了bind9。 我的named.conf仅包含“include”/etc/bind/named.conf.local”;,其他所有内容都被禁用 我的named.conf.local具有: options { listen-on port 53 { 0.0.0.0; }; listen-on-v6 port 53 { ::1; }; directory
options {
listen-on port 53 { 0.0.0.0; };
listen-on-v6 port 53 { ::1; };
directory "/var/cache/bind";
allow-query { localhost; };
recursion yes;
querylog yes;
};
acl clients {
172.30.108.0/24;
};
view "internal-view" {
match-clients { internal; };
allow-query { internal; };
allow-query-cache { internal; };
zone "limit.com." {
type master;
file "/etc/bind/db.limit.com";
};
# Mapping: Everything else to 127.0.0.1
zone "." {
type master;
file "/etc/bind/db.mapping";
};
};
view "external-view" {
match-clients { any; };
allow-query { any; };
allow-recursion { any; };
allow-query-cache { any; };
zone "wiincon.de." {
type master;
file "/etc/bind/db.limit.com";
};
include "/etc/bind/named.conf.default-zones";
};
My db.limit.com:
; BIND reverse data file for broadcast zone
;
$TTL 180
@ IN SOA localhost. root.localhost. (
5 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
@ IN A 192.168.5.5
www IN A 192.168.5.5
最后是我的db.mapping:
; BIND reverse data file for broadcast zone
;
$TTL 3600
@ IN SOA localhost. root.localhost. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
* IN A 127.0.0.1
我现在的问题是:172.30.108.0/24中的客户端可以查询除www.limit.com以外的任何内容
实际上:来自172.30.108.0/24的客户端应该能够解析limit.com和www.limit.com,其他所有内容都应该使用127.0.0.1进行响应
当我做一个nslookup的时候
非原创回答:
***找不到limit.com:没有答案
我肯定我错过了一些很明显的东西。非常感谢您的帮助。找到了。问题是“系统”本身有8.8.8.8作为名称服务器,因此绕过了本地的一切。这给了你这个故事的士气:宁愿
dig
而不是nslookup
,并且在故障排除时总是指定查询哪个名称服务器,从权威的名称服务器开始,然后是递归的名称服务器,为了更好地理解你得到的答复。