为什么nslookup不能从我的绑定服务器上返回我期待的内容? (configurationRPZ)

在这个问题之前,我正在寻找一些帮助,以find一种方式来返回不同的响应来查询基于他们的IP地址的客户端。 这个问题在这里得到了回答: 我如何有select地覆盖绑定DNS服务器上的一些Alogging?

我遵循了接受的答案,现在遇到了问题。

当我运行:

nslookup faq.test.com 

我期待这一点:

 root@dev:/etc/bind# nslookup vaultofsatoshi.com Server: 172.16.225.132 Address: 172.16.225.132#53 Non-authoritative answer: Name: faq.test.com Address: 192.168.1.1 

但是,我得到这个:

 root@dev:/etc/bind# nslookup faq.test.com Server: 172.16.225.132 Address: 172.16.225.132#53 ** server can't find faq.test.com: NXDOMAIN 

我应该提到,查询google.com或任何其他网站的工作,并返回一切正常,只是我重写,它失败的那些。 我已经包括我的configuration文件下面,任何帮助,将不胜感激。

/etc/bind/named.conf

 include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; 

/etc/bind/named.conf.options

 options { directory "/var/cache/bind"; forwarders { 8.8.8.8; 8.8.4.4; }; response-policy { zone "development-overrides"; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; allow-query { trusted; }; allow-recursion { trusted; }; recursion yes; dnssec-enable no; dnssec-validation no; }; 

/etc/bind/named.conf.local

 include "/etc/bind/rndc.key"; acl "trusted" { 172.16.225.132; 127.0.0.1; }; include "/etc/bind/zones.override"; logging { channel bind_log { file "/var/log/named/named.log" versions 5 size 30m; severity info; print-time yes; print-severity yes; print-category yes; }; category default { bind_log; }; category queries { bind_log; }; }; 

/etc/bind/named.conf.default-zones

 // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; 

在/ etc /绑定/开发,覆盖

 $TTL 1H @ SOA LOCALHOST. test.com (1 1h 15m 30d 2h) NS LOCALHOST. support.test.com A 192.168.1.1 faq.test.com A 192.168.1.1 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM * A rpz-passthru. 

RPZ区域的最后一行在语法上看起来不正确。

RPZ区域的语法与常规区域相同,它只对RPZ有特殊的语义。

考虑到这一点,很明显Alogging不可能有rpz-passthru. 因为它的价值。 Alogging只能有一个IPv4地址作为其值。

如果您查看RPZ文档,您会发现特殊的RPZ指令(如rpz-passthru. )使用CNAMEloggingtypes。

named-checkconf -zj和/或读取日志通常是有帮助的。 我会假设,从问题使用区域数据时,RPZ区域将无法加载,应该有关于这个错误(我会期望有关“坏点”的错误或沿着这些线的东西)。

作为一个单独的笔记,我不认为最后一行是真的需要,它似乎只是(尝试)明确定义默认的行为。