Need Help With Setting up a Recursive Nameserver

Chuck Aurora ca at
Fri Apr 30 15:03:52 UTC 2021

On 2021-04-30 07:20, Sainik Biswas via bind-users wrote:
>    I need some help setting up a recursive nameserver for my internal
> network using BIND 9. The recursive name server is not resolving any
> domains.
> I am running the BIND 9 package from the ppa:isc/bind repo.
> BIND Version Number: 9.16.15
> OS: Ubuntu 18.04 LTS
> This is the named.conf.options config file for my caching name server
> acl internalnetwork { [1]; [2]; };

I hope that [1] and [2] are not actually there.  Please turn off HTML
when posting to lists.  Thank you.

Also note that your acl does not include the host itself, loopback 
address  See the "localhost" and "localnets" built-in acls.

> options {
>     directory        "/var/cache/bind";
>     dnssec-validation    no;
>     listen-on        {;; };

Do you need to change this from the default, "any;"?

>     listen-on-v6        { none; };
>     recursion               yes;
>     allow-recursion         { internalnetwork; };

In fact "localhost; localnets;" is the default for allow-recursion.

>     allow-query        { internalnetwork; };
>     allow-transfer        { none; };
> };

> Error Log [lame-servers.log]
> 2021-04-30T11:53:25.385Z info: FORMERR resolving './NS/IN':

> Error Log [resolver.log]
> 2021-04-30T11:58:17.784Z notice: DNS format error from
> resolving ./NS for <unknown>: non-improving referral

> My ISP most probably uses some kind of transparent DNS proxy. I have

Probably so.  This is what you get when an ISP hijacks all outbound
53/udp packets and redirects them to their own recursive resolver[s].

> come to that conclusion based on running the test at
> [3]. It does not matter which DNS I set in my laptop or desktop, the
> DNS IP always shows up as the ISP's DNS [,
>]. The only way I could bypass this was by using
> DNSCrypt Proxy. Is it possible that my ISP is preventing the root
> nameservers from resolving correctly which is preventing my caching
> nameserver from working correctly?

Yes; named as recursive resolver requires authoritative responses to
the iterative queries it makes to resolve the root, and then to top-
level domains, and so on.  "Lame server" means you're trying to contact
authoritative NS hosts and receiving non-authoritative replies.

You can prove this to yourself with directed dig commands.  I will give
my domain as an example:

dig ns @

You should see "aa" among the flags and a warning, "recursion requested
but not available".  But you won't.  Your query was hijacked.

> Or maybe I have incorrectly configured something?
> Can anyone help me figure out what exactly is the problem?

You are correct.  Complain to the ISP.  Good luck.

More information about the bind-users mailing list