We have our Debian server running Virtualmin Pro and had an issue in the past where BIND DNS was stopping website contact pages from sending emails out. After a bit of troubleshooting, it was found that disabling BIND solved the issue (DNS is being handled by another server). Trouble is whenever I reboot the server BIND somehow switches itself back on.

My question is (after such a long winded start), is it possible to remove BIND completely from the server or will this cause other issues? Or is there a way to make sure it never turns on after a restart?

Thanks for your help.

Status: 
Active

Comments

Howdy -- just to clarify -- what change is it you're making exactly to solve the issue you're having there? Simply disabling the BIND daemon from running as a process?

Also, what are the contents of your /etc/resolv.conf file?

I just turn off BIND in Webmin > Status. That usually does the trick but as I stated earlier if I reboot it starts up again.

resolve.conf contains

nameserver 127.0.0.1 nameserver 119.31.226.4 nameserver 8.8.8.8 domain host.net.au

Okay, I think I understand what you're running into.

The first thing you'd want to do, if you're not longer using your server as a DNS server, is to configure Virtualmin to no longer use the DNS feature.

To do that, go into System Settings -> Features and Plugins, and there, disable the BIND DNS feature.

Once that is complete, I suspect things will actually begin working the way you'd expect.

However, if you wanted, you could also remove the "nameserver 127.0.0.1" line from /etc/resolv.conf, which tells your server to no longer use BIND for performing any DNS lookups. You shouldn't need to do that though, the first step above should be enough to get things working.

I'm a little nervous to do that. The Ubuntu server has BIND switched off in Webmin > Status but it is still an enabled feature, yet after a reboot it stays off. As Ubuntu is a derivative of Debian I thought it should behave the same way but it doesn't. However as a test I thought I'd deselect it in Ubuntu (handy having a server that is for freebies - they can't complain if things go wrong), but it won't switch off as all sites are apparently using it (even though they aren't).

I'm going to assume that the issue will occur with the Debian server too. Do I need to go into each virtual server and disable DNS (I'll test this on Ubuntu first)?

All good. Tested on Ubuntu first and then Debian and all is ok. BIND feature disabled on both servers. Thanks again for your help.

Excellent! Yeah what you described is what would need to happen -- that feature does indeed need to be disabled from the domains using it, before Virtualmin will allow you to disable it completely.

If domains are configured to use the BIND DNS feature, that can cause the problems you're experiencing if your server isn't actually the primary DNS server.

So I believe disabling the BIND DNS feature as you just did will resolve the issues you're seeing.

At that point, it's up to you whether you actually disable the service or not, though it's fine to do so.

Let us know if you see any problems, or if you have any additional questions.