Caching Nameserver Setup so I can use URIBL

Hello:

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:

https://www.virtacoresupport.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=134

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 ns1.mynameserver.org. 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 yahoo.com 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 8.8.8.8 - there are no problems.

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

Thanks,

Bill

Howdy,

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

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

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:

nameserver 127.0.0.1

Yes, I installed using the install.sh script.

I see the 127.0.0.1 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 127.0.0.1 to resolv.conf all I get is this:

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

Hi:

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

Bill

Howdy,

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.

-Eric

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.

Bill