Caching Nameserver Setup so I can use URIBL


I want to use the URIBL spam database with SpamAssassin- and since there are so many queries from my ISP’s nameserver, they disallow use of their database when using this nameserver. So I am attempting to set up my own nameserver on my dedicated Centos6 server running Webmin / Virtualmin.

I am having a problem getting my nameserver working so I can accomplish the above. I went through the setup here:

and it seems to work fine for the domain I set it up with. I can ping the nameserver, and the nameserver IP. The IP resolves correctly to the domain I am pointing the domain from the registar to the nameserver and it works.

However, on my dedicated server, when I change resolv.conf to have only “nameserver x.x.x.x” where x.x.x.x is the IP of the nameserver, when I do: host I get:

;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

changing back to my ISP’s nameservers or using nameserver - there are no problems.

Any idea on what I can check so that I can use my own nameserver in resolv.conf?




How did you install Virtualmin; did you use the script?

If so, you should have a working BIND version installed and configured for use… it would be on the IP address

You can verify that BIND is running with this command:

/etc/init.d/named restart

Once you run that, you should then be able to add a line like this to your resolv.conf file:


Yes, I installed using the script.

I see the nameserver configured as a Master DNS zone.

BIND is definitely running:

root 10:42 AM /etc # /etc/init.d/named restart
stopping named: . [ OK ]
starting named: [ OK ]
root 10:46 AM /etc #

But when I add nameserver to resolv.conf all I get is this:

root 10:46 AM /etc # nslookup
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached


Is there a way to reset BIND config to original after was run? I think it is best to start from scratch.



Outside of reinstalling BIND (which would remove your DNS zones for the domains you’re hosting), there isn’t a simple way to do that… once the config file is changed, it’s changed for good :slight_smile:

You may just want to review your BIND config, to try and determine what is preventing connections to that service.

You could also post your BIND config here, we can certainly take a look and offer our thoughts.


Thanks for the suggestions. I saw a lot of stuff in /etc/named.conf that wasn’t needed. A big help was looking at this: /usr/share/doc/bind*/sample/ for example named configuration files.

When I stripped the file to the basics, it now works like a charm.