May 27, 2020 | 8:11 pm
You are here:  / First Time / HOWTO / [HOWTO] Fix bind9 to allow remote queries

[HOWTO] Fix bind9 to allow remote queries

I host this site on a server in my home, however, I use an outside provider to host my DNS for me.

Since that provider recently starting charging me for queries, I have decided to host my own DNS server as well.

It is an Ubuntu (Debian derivative) server box so I installed bind9 the easy way:

$ sudo apt-get install bind9

Once installed, I transferred all of my domains over to this box.  I also set up my workstation to use the new box as it’s primary DNS server.

All of my queries were failing with an error like the following:

Dec 27 12:44:56 www named[18595]: client XXX.XXX.XXX.XXX#1187: query (cache) ‘’ denied

After doing some web searches, I couldn’t really find an answer that would fix the issue.

Well, after asking a few local guys I know, one finally provided the answer:

In the /etc/bind/named.conf.options file, add the following lines at the bottom, just before the last closing curly brace (}):

allow-recursion { any; };
allow-query { any; };
allow-query-cache { any; };

Save the file, restart bind, and bingo!  I can query now.