How to fix a dig command with status: REFUSED?

一曲冷凌霜 提交于 2019-12-10 21:18:09

问题


I need help fixing a status refused. I had a look at the named.conf and everything looks ok.

I even changed allow-query to any, it used to be localhost.

dig xxx.com @ns1.xxx.com

; <<>> DiG 9.8.3-P1 <<>> xxx.com @ns1.xxx.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 41866
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;xxx.com.   IN  A

;; Query time: 29 msec
;; SERVER: xx.xx.xx.xxx#53(xx.xx.xx.xxx)
;; WHEN: Wed Feb 25 23:04:48 2015
;; MSG SIZE  rcvd: 41

回答1:


I think I had to do a service named restart. Everything started working almost immediately




回答2:


I solved the same looking issue by changing allowed-query in bind's options configuration section. I included my vpn's network 10.1.0.0/24 to access dns:

options {
    ...
    allow-query { localhost; 10.1/24; };
    ...
};

After that I ofc executed sudo service named reload to reread the configuration.




回答3:


  1. To solve the issue I first installed bind9.
  2. I edited my resolve.conf to show the below:

    #DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
    #FallbackDNS=
    #allow-recursion { any; };
    
  3. Then I edited the line below in the bind9 config file

    # run resolvconf?
    RESOLVCONF=yes
    


来源:https://stackoverflow.com/questions/28734342/how-to-fix-a-dig-command-with-status-refused

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!