Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server.

Thanks. If you review Reply #34, Joe explained it and what the issue is and how it should work. To be honest I am completely familiar with all the terminology, but he did state if it works then the issue was fixed. Thanks for your input nonetheless. I will monitor my site to see how it performs.

Fixing the Local DNS Inquiry

The fix is pretty simple and involves by logging to your server via Secured Shell with ROOT capability. I am assuming you have already done the basic steps when starting a new server.

Open up /etc/resolv.conf and add the following entry at the bottom.

nameserver 127.0.0.1

Save your new resolv.conf file. Newer DNS checking will now see the localhost entry (IP 127.0.0.1) and will start scanning your local BIND settings before doing a third-party DNS search.

If, OTOH, your server isn't acting as a nameserver for your domains you can just uncheck the BIND DNS Domain feature.

I wish this was at the top of the thread. 100% solved the problem.

Thank you

it works for me.
Thank you.

It’s July 2018 and I just installed Virtualmin on Ubuntu 18.04 LTS and the issue continues. However, it seems to be an issue that affects not just Virtual min but other DNS related matters. I found this post on askubuntu.com and it seems to have solved my problem: https://askubuntu.com/a/1012648/841203

This is the solution given there:

“You can install a package resolvconf, which will modify the way /etc/resolv.conf is built up at system boot.
sudo apt install resolvconf”

“You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail. If you put in this file a line nameserver 8.8.8.8, this line will be added at the end of /run/resolvconf/resolv.conf at boot. /etc/resolv.conf will now be a symbolic link to this file.”

This might just help some user.

Think this is easier,
https://tjosm.com/6430/fix-system-is-not-setup-to-use-itself-as-a-dns-server/

Thanks @Freddy63. I don’t seem to have /etc/rc.local on my machine.

Hi all,
I think it has to do with the fact that when you install CentOS minimal it uses the NetworkManager and that’s the sneaky bit. I had same problem, then suddenly the penny dropped. Simple fix, as root start the # nmtui and add your extra dns 127.0.0.1. Any manual add in the /etc/resolv.conf or in /etc/sysconfig/network-scripts/ifcfg-xxx will get lost after a reboot when you use the NetworkManager. DHCP might also be a part but check if the NM is involved for the same reason


Now I need to find out how to get rid of NM without breaking things.

Installed Virtualmin first time did not encounter this issue. Reinstalled and it appeared. Searched all over and my quick fix to this is:
Log in to Webmin > Networking > Network Configuration > Hostname and DNS Client. In my instance for DNS servers instead of 127.0.0.1 i have 127.0.0.53. Changed that to 127.0.0.1. It passes validation and works until server restarts. It resets back to 127.0.0.53 after restart. Will look into this further.

USE chatr + command for that file.