0

I've setup named to act as a local dynamic dns server on my private network with dhcpd. All is working.

The only thing that bugs me is that I'm getting REFUSED when querying hostname that doesn't exist when I should get NXDOMAIN.

For example:

host -t a ns
ns.domain.local has address 192.168.1.225

host -t a ns1
Host ns1 not found: 5(REFUSED)

My /etc/named.conf has recursion no;

When I'm querying for not-existing FQDN record, I actually get proper NXDOMAIN response.

host -t a ns1.domain.local
Host ns1.domain.local not found: 3(NXDOMAIN)

Using tcpdump I can track the following behavior:

17:22:04.602686 IP localhost.33281 > localhost.domain: 29032+ A? ns1.domain.local. (31)
17:22:04.602895 IP localhost.domain > localhost.33281: 29032 NXDomain*- 0/1/0 (75)
17:22:04.603198 IP localhost.60655 > localhost.domain: 49935+ A? ns1. (21)
17:22:04.603270 IP localhost.domain > localhost.60655: 49935 Refused- 0/0/0 (21)

My /etc/resolv.conf has search search domain.local so it tries first and reports NXDOMAIN which is fine but then goes for ns1. and REFUSED.

What am I missing?

  • Turn up the debug logging on named, then tell us what its complaints are. – Warren Young Mar 5 '15 at 18:09
  • 1
    To look up ns1. (note the dot) it has to recurse, and you've turned that of, so it returns REFUSED. The problem is not with bind but with the client (dig) that's using a search list that includes .. – wurtel Mar 6 '15 at 10:17
  • @wurtel make that an answer! – Celada Mar 6 '15 at 11:08
1

To look up ns1. (note the dot) bind (actually the named process) has to recurse, and you've turned that off; hence it returns REFUSED.

The problem is not with bind but with the client (dig) that's using a search list that includes ..

  • Thanks, by adding options ndots:0 to my /etc/resolv.conf I get the expected behavior! – autogun Mar 6 '15 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.