挖掘返回“状态:拒绝”外部查询?

我似乎无法解决为什么我的DNS不能正常工作,如果我运行正确的名称服务器挖:

# dig ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> ungl.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24585 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;ungl.org. IN A ;; ANSWER SECTION: ungl.org. 38400 IN A 188.165.34.72 ;; AUTHORITY SECTION: ungl.org. 38400 IN NS ns.kimsufi.com. ungl.org. 38400 IN NS r29901.ovh.net. ;; ADDITIONAL SECTION: ns.kimsufi.com. 85529 IN A 213.186.33.199 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sat Mar 13 01:04:06 2010 ;; MSG SIZE rcvd: 114 

但是当我从同一个数据中心的另一台服务器运行它时,我收到:

 # dig @87.98.167.208 ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> @87.98.167.208 ungl.org ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 18787 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;ungl.org. IN A ;; Query time: 1 msec ;; SERVER: 87.98.167.208#53(87.98.167.208) ;; WHEN: Sat Mar 13 01:01:35 2010 ;; MSG SIZE rcvd: 26 

我的这个域的区域文件是

 $ttl 38400 ungl.org. IN SOA r29901.ovh.net. mikey.aol.com. ( 201003121 10800 3600 604800 38400 ) ungl.org. IN NS r29901.ovh.net. ungl.org. IN NS ns.kimsufi.com. ungl.org. IN A 188.165.34.72 localhost. IN A 127.0.0.1 www IN A 188.165.34.72 

named.conf.options是默认的:

 options { directory "/var/cache/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 { ::1; }; listen-on { 127.0.0.1; }; allow-recursion { 127.0.0.1; }; }; 

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"; zone "eugl.eu" { type master; file "/etc/bind/eugl.eu"; notify no; }; zone "ungl.org" { type master; file "/etc/bind/ungl.org"; notify no; }; 

服务器运行的是Ubuntu 9.10和Bind 9,如果有人能为我说明这件事,那会让我非常高兴!

谢谢

虽然我可能正在挖掘一个旧的线程,但我这样做是因为这是Googlesearch“查询状态被拒绝”时最相关的结果之一。

在我的具体情况下,我发现我必须包括allow-query { any; }; allow-query { any; }; 在named.conf中的每个区域定义中。

乍一看,我觉得它并没有configuration为听取世界其他地方的listen-on { 127.0.0.1; }; listen-on { 127.0.0.1; }; 。 你需要在那里添加适当的IP地址。

我做同样的事情,但我把allow-query选项放在named.conf.options中

如果没有伴随资源logging(RR)的NOERROR意味着没有这样的logging,所以当您将“版本”设置为“无”时获得NOERROR响应并且没有“logging”,则其按预期工作。

还有一个BIND9 allow-queryconfiguration语句,但我认为默认是允许从任何地方查询。

我有完全相同的问题(本地挖掘状态NOERROR,从外部挖掘状态REFUSED),解决scheme是将匹配客户端从“localhost”(这是默认的绑定安装)更改为“任何”(稍后我可能找出我的域名提供商的确切IP是什么,并出于安全原因限制它到该特定的IP)。 另外,我将视图名称从local_something更改为默认值。 名字真的没关系。

 view default { match-clients { any; }; match-destinations { any; }; include "/etc/named.rfc1912.zones"; }; 

这真的是这个“挖掘状态被拒绝”的问题。 在更改match-clients参数之后,我的dig @ 12.34.56.78 mydomain.com查询开始以NOERROR状态parsing,域名提供者(godaddy)立即caching了名称服务器logging。 由于我的区域文件已经正确configuration,因此域名立即在互联网上可见。

尽pipe如此,我还是把头撞到了墙上好久才解决了这个问题。

我必须input一个明确的参考networking,我希望允许recursion。 指定“任何”没有帮助。 默认情况下(Umbutu Server 15)在/etc/bind/named.conf.options文件中没有这个/etc/bind/named.conf.options

 recursion yes; << needed to add this but did not resolve greater prob allow-recursion { any; }; << this did not work allow-recursion { 10.1.0.0/16; }; << this did the trick 

你确定你把查询发送到正确的地方吗?

您的服务器188.165.34.72( r29901.ovh.net )正在运行BIND 9.5.1-P2.1 – 它将按照预期的那样响应string查询dig @ip version.bind ch txt

但是,上面引用的IP地址会返回NOTIMPL错误,即使引用的configuration文件中没有关于*.bind伪logging的内容,BIND也需要显式configuration才能禁用它们。

因为你只允许从本地机器recursion。

如果你想允许添加合适的IP地址,你需要改变监听值到本地机器上的任何适配器,或者把本地机器的接口的IP地址:

 listen-on { any;} or xxxx;