我正在运行 Ubuntu 12.04 和 bind9。我的仅缓存 DNS 服务器实际上是一个开放的 dns 解析器,因此我正在尝试更正此问题。
我试图遵循本指南。
命名.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
#include "/etc/bind/named.conf.default-zones";
named.conf.local 只包含。
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
命名的.conf.options
acl "trusted" {
127.0.0.1/32;
X.X.192.0/20;
};
options {
recursion no;
additional-from-cache no;
allow-query { none; };
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
};
view "trusted" in {
match-clients { trusted; };
allow-query { trusted; };
recursion yes;
additional-from-cache yes;
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
};
我可以毫无问题地重新启动绑定,我可以查询绑定。然而,当我测试时,我仍然是一个开放的解析器,当我查看 DNS top 时,我所有的顶级查询都来自定义范围之外的 IP。所以我知道我有问题。
这就是我使用的: