绑定9 – 本地configuration是重要的

我有一个专用的服务器,我有同一台服务器上的DNS和Web服务器。 为了configurationDNS,我使用了BIND … BIND为localhostconfiguration了默认configuration,例如127, 0 , 255 and localhost 。 我已经删除了用于caching的type:hint部分。

我的疑问是

  1. 我真的需要这些configuration,因为我的DNS是Authorative Only ,如果我需要这些configuration,他们只Authrorative或他们的caching服务器
  2. 如果我需要这些configuration文件,那么他们只在内部使用,或者他们可以从外人使用

这里是我的conf文件请求:

named.conf.options:

 options { directory "/etc/bind"; version "Hello"; recursion no; allow-transfer{none;}; managed-keys-directory "/etc/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // forwarders { // 0.0.0.0; // }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; 

named.conf.default-区

 // prime the server with knowledge of the root servers zone "example.com" { type master; file "/etc/bind/master/master.example.com"; }; zone "XXXin-addr.arpa" { type master; file "/etc/bind/master/master.XXXX"; }; // 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"; }; 

我named.conf.local是空白的,所以我没有添加它,区域文件是正常的,工作

启用recursion时,默认的绑定configuration会启用大量的内置空区域 。 这是在没有手动定义任何区域的情况下完成的,即您之前在configuration文件中定义的区域可能完全是多余的。

根提示区( type hint区为. )只需recursion,但也有一个内置的默认值,并将工作,而无需手动指定它在你的configuration文件。

你想确保只有权威的服务器是你要么完全禁用recursion或限制recursion访问。 请参阅recursionallow-recursion选项(以及其他allow-*选项,当您开始重写某些选项时,这些选项在某种程度上会进行交互)。

你真的需要发布你的configuration信息,以便我们能够回答这个问题。 只有authorative的服务器不会为localhost等请求默认configuration,而只需要为其授权的区域。