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

50 posts / 0 new
Last post
#1 Wed, 06/09/2010 - 07:48

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

Hmm, sorry for creating another thread, but thought this deserves its own thread. This question was asked few times in this forum, but i was unable to find a clear answer that i would follow. So it would be awesome if someone can give me a quick fix for this (would help everyone else too)...

Any way, i was trying to run "Re-Check Config" under "System Settings" and i get the following:

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add to the list of DNS servers, or turn off the BIND feature on the module config page.

.. your system is not ready for use by Virtualmin.

any idea how to Fix this?

Im running CentOS 5.5 on a VPS hosted by volume drive (if that helps).
Just to add, im really noob, so it would be greatly appreciated if you can explain a tiny bit in detail what i can/should do... :)

Thanks in advance.

Wed, 06/09/2010 - 07:56

just to add,

i can simply add to the list of DNS servers (this fixes the problem)... but sadly, when ever i restart my vps, the list of dns servers resets back to default and i get this same error again... so i guess every time i restart my server i can remember to add this again, but is there any way to fix this (or prevent this from happening)? O.o

Wed, 06/09/2010 - 10:08

Chances are that's happening due to your IP address being obtained by DHCP. By default, the DHCP client will set a number of things, including the DNS servers.

To prevent that, edit /etc/dhclient-eth0.conf , and make sure there is a line like :

prepend domain-name-servers;

Mon, 11/16/2015 - 17:19 (Reply to #3)

In CentOS 7, the file will be along the lines of '/etc/dhcp3/dhclient.conf'. Ensure you carry out a restart of the service (service named restart) or reboot the system.

Just add the line as Eric stated.

prepend domain-name-servers;


Wed, 06/09/2010 - 16:14

hmmmm, cant seem to find that file... any other ideas? or should i create that file instead?

here is a ls of my etc folder (if it helps)...

[root@bob ~]# cd /etc
[root@bob etc]# ls
adjtime                      rc2.d
aliases                    rc3.d
aliases.db        libaudit.conf                  rc4.d
alternatives      libuser.conf                   rc5.d
awstats           localtime                      rc6.d
bashrc            login.defs                     rc.d
blkid             logrotate.conf                 rc.local
clamd.d           logrotate.d                    rc.sysinit
cron.d            lvm                            redhat-release
cron.daily        mail                           resolv.conf
cron.deny         mailcap                        rndc.key
cron.hourly       mailman                        rpc
cron.monthly      mail.rc                        rpm
crontab           makedev.d                      rwtab
cron.weekly       mime.types                     rwtab.d
csh.cshrc         mke2fs.conf                    sasl2
csh.login         modprobe.d                     scsi_id.config
db.cache          motd                           securetty
dbus-1            mtab                           security
default           multipath.conf                 selinux
depmod.d          my.cnf                         sensors.conf
dev.d             named.caching-nameserver.conf  services
DIR_COLORS        named.conf                     sestatus.conf
DIR_COLORS.xterm  named.rfc1912.zones            setuptool.d
dovecot.conf      netplug                        shadow
environment       netplug.d                      shadow-
exports           nsswitch.conf                  shells
fedora            odbc.ini                       skel
filesystems       odbcinst.ini                   smrsh
fonts             openldap                       snmp
freshclam.conf    opt                            ssh
fstab             pam.d                          subversion
ftpusers          passwd                         sudoers
gcrypt            passwd-                        sysconfig
group             pear.conf                      sysctl.conf
group-            php.d                          syslog.conf
host.conf         php.ini                        termcap
HOSTNAME          pki                            udev
hosts             postfix                        usermin
hosts.allow       ppp                            vimrc
hosts.deny        printcap                       virc
httpd             procmailrc                     virtualmin-license
init.d            profile                        warnquota.conf
initlog.conf      profile.d                      webalizer.conf
inittab           proftpd.conf                   webmin
inputrc           protocols                      wgetrc
iproute2          quotagrpadmins                 X11
issue             quotatab                       xinetd.d         rc                             yum
krb5.conf         rc0.d                          yum.conf       rc1.d                          yum.repos.d
Wed, 06/09/2010 - 18:27

Do you have a file "/etc/sysconfig/network-scripts/ifcfg-eth0"? If so, what are it's contents?


Wed, 06/09/2010 - 22:02

no such file again...

here are the content of the network script folder:

[root@bob network-scripts]# ls
ifcfg-lo        ifdown-isdn    ifup-eth    ifup-routes
ifcfg-venet0    ifdown-post    ifup-ippp   ifup-sit
ifcfg-venet0:0  ifdown-ppp     ifup-ipsec  ifup-sl
ifcfg-venet0:1  ifdown-routes  ifup-ipv6   ifup-tunnel
ifdown          ifdown-sit     ifup-ipx    ifup-wireless
ifdown-bnep     ifdown-sl      ifup-isdn   init.ipv6-global
ifdown-eth      ifdown-tunnel  ifup-plip   net.hotplug
ifdown-ippp     ifup           ifup-plusb  network-functions
ifdown-ipsec    ifup-aliases   ifup-post   network-functions-ipv6
ifdown-ipv6     ifup-bnep      ifup-ppp    route-venet0
Fri, 11/14/2014 - 08:50 (Reply to #7)

The file you need to edit is: ifcfg-venet0 instead of the eth0 file. Add the DNS server in that file will fix your issue. I used VolumeDrive before and did the same thing.

Wed, 10/27/2010 - 16:18

I'm facing the exact same error.

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add to the list of DNS servers, or turn off the BIND feature on the module config page.

I add and then when you restart, the same thing again.

Wed, 10/27/2010 - 19:07

@daysonp: I suppose the same question which remained unanswered a few months back also applies to you: Is your system getting its IP address via DHCP?

This link might help:

Wed, 10/27/2010 - 20:01

haha yeah, i never found a solution to this... have to manually set the every time i restart... siigh, its annoying... Any idea what will happen if i ever forget this?

and thanks Locutus, will have a look at that link later, see if it helps me at all...

Mon, 05/23/2011 - 00:02 (Reply to #11)

I see this is an old thread, but maybe someone else searching could make some use from it.

To fix the issue relating to not staying after a reboot or when ever.

I did this on a desktop version of ubuntu. open the network connections icon, then highlight your network interface. now click edit to that interface. I am assuming the IP has been setup static and you are behind a router. Look at the DNS section, and add You may need to find out what your DNS ip's are. (You can do this be looking in your router.)

here is an example of how mine DNS setting look in my settings.

DNS: 123.456.789.1, 987.654.321.1,

Sat, 12/10/2011 - 06:08

I wonder, does it even matter if is not listed. Doesn't it just mean that lookups will be done remotely instead of locally?

If someone knows what is the counterpart for the shell (I doubt if much people use a desktop on their server) for the desktop solution on CentOS 6 or Scientific Linux 6 then please let us know.

Sun, 12/11/2011 - 13:35

The IP has to be listed in /etc/resolv.conf if your domains are configured to use your local server as their nameserver.

If that IP isn't listed, then lookups of your domains won't work properly.

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


Fri, 06/02/2017 - 09:37 (Reply to #14)
Erutan409's picture
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

Thu, 08/31/2017 - 23:36 (Reply to #15)

it works for me. Thank you.

Tue, 01/07/2014 - 04:53

I can't believe that this is still happening on my CentOS 6.5. And no, my IPs are not assigned by DHCP. I tried manually entering the IP into /etc/resolv.conf but it only stays there until server reboots.

Tue, 01/07/2014 - 09:54

Are you by chance on a VPS, perhaps OpenVZ? Or do you have a dedicated server?


Tue, 01/07/2014 - 21:57

I have a dedicated server. I installed CentOS 6.5 64-bit by myself.

Wed, 01/08/2014 - 01:36

Are you by chance on a VPS, perhaps OpenVZ? Or do you have a dedicated server?

I can confirm that I recently saw the same thing when setting up virtualmin inside a OpenVZ container (CentOS) on a Debian 7/Wheezy HW node.

Wed, 01/08/2014 - 10:12

Okay, what output do you receive if you run this command:

Wed, 01/08/2014 - 17:17

The OpenVZ container (running CentOS 6/64 bit) is up and running with lo/venet0/venet0:0 interfaces and a public IP - but there are no entries under /etc/sysconfig/networking/devices/

Note that the OpenVZ container was set up by and is running via Proxmox.

And it's not a real issue here, I just added the entry and everything works nicely.

Wed, 01/08/2014 - 20:56

When I run:


I get "Permission denied" message.

Wed, 01/08/2014 - 23:01

Try doing that as the root user.


Wed, 01/08/2014 - 23:13

I did do that as root.

Thu, 01/09/2014 - 11:20


What output do you receive when typing the following commands:

ls -ld  /etc/sysconfig/
ls -ld  /etc/sysconfig/networking/
ls -la /etc/sysconfig/networking/devices/
Thu, 01/09/2014 - 20:00
[root@ns1 ~]# id
uid=0(root) gid=0(root) groups=0(root),501(vboxusers)

[root@ns1 ~]# ls -ld /etc/sysconfig/
drwxr-xr-x. 9 root root 4096 Jan  9 07:18 /etc/sysconfig/

[root@ns1 ~]# ls -ld  /etc/sysconfig/networking/
drwxr-xr-x. 4 root root 4096 Nov 22 13:20 /etc/sysconfig/networking/

[root@ns1 ~]# ls -la /etc/sysconfig/networking/devices/
total 16
drwxr-xr-x. 2 root root 4096 Jan  5 20:23 .
drwxr-xr-x. 4 root root 4096 Nov 22 13:20 ..
-rw-r--r--  2 root root  364 Jan  5 20:04 ifcfg-eth0
-rw-r--r--  2 root root  224 Jan  5 20:23 ifcfg-eth0:1
Fri, 01/10/2014 - 09:18


Hmm, so I'm interested in seeing the contents of the file "ifcfg-eth0".

According to the permissions of that file, and the various directories leading up to it -- it shouldn't even require root to root it, any user should be able to see it's contents. So I'm not sure why you received that error...

Let's try this, perhaps rather than using a wildcard in that command to view it, try running this:

cat /etc/sysconfig/networking/devices/ifcfg-eth0

Wed, 07/02/2014 - 17:51

reinstalled virtualmin on a new VPS, and im having this problem again. Every restart, i have to re-enter the dns Same error as the 1st post above.

Here are responses to all the suggested commands above:

[root@orby ~]# /etc/dhclient-eth0.conf
-bash: /etc/dhclient-eth0.conf: No such file or directory
[root@orby ~]# /etc/sysconfig/network-scripts/ifcfg-eth0
-bash: /etc/sysconfig/network-scripts/ifcfg-eth0: No such file or directory
[root@orby ~]# /etc/resolv.conf
-bash: /etc/resolv.conf: Permission denied
[root@orby ~]# /etc/sysconfig/networking/devices/ifcfg-eth*
-bash: /etc/sysconfig/networking/devices/ifcfg-eth*: No such file or directory
[root@orby ~]# id
uid=0(root) gid=0(root) groups=0(root)
[root@orby ~]# ls -ld  /etc/sysconfig/
drwxr-xr-x 9 root root 4096 Jul  2 18:19 /etc/sysconfig/
[root@orby ~]# ls -ld  /etc/sysconfig/networking/
drwxr-xr-x 4 root root 4096 Feb 20 05:44 /etc/sysconfig/networking/
[root@orby ~]# ls -la /etc/sysconfig/networking/devices/
total 8
drwxr-xr-x 2 root root 4096 Feb 20 05:44 .
drwxr-xr-x 4 root root 4096 Feb 20 05:44 ..
[root@orby ~]# cat /etc/sysconfig/networking/devices/ifcfg-eth0
cat: /etc/sysconfig/networking/devices/ifcfg-eth0: No such file or directory

Any more suggestions?

The server is a VPS hosted by Virtualization Type (OpenVZ) Operating System centos-6.4-amd64-minimal.tar.gz

Sat, 08/02/2014 - 09:43

Any fix for this yet?

I manually added "nameserver" to /etc/resolv.conf and rebooted. When the machine woke up, it was already gone...


Wed, 08/06/2014 - 05:04 (Reply to #30)

Same problem for me on a fresh install of Ubuntu 14.04.

This worked for me:- System Settings / Virtualmin Configuration / Advanced Options / Check resolv.conf for this system ? - Set it to No

I also disabled mailman to fix another issue.

Tue, 11/11/2014 - 15:24 (Reply to #31)

tks greentrees!

Wed, 08/06/2014 - 10:23

This issue most commonly occurs when using DHCP, which can cause the DNS servers to be overwritten each time the DHCP lease is renewed.

There's details on that issue here in the section "Received Virtualmin error that isn't listed in /etc/resolv.conf":

Wed, 08/06/2014 - 18:25

Ubuntu 14 has overly complicated the network interface setup stuff, and its the issue with not being able to add using the network interface in webmin.

You can even manually add in the resolver.conf and it will happily break it. BUT! a bit of digging resulted in this:

Find /etc/network/interfaces drop down to the bottom of that file and add this line (using the correct first number for your network) dns-nameservers

Immediately Webmin will see the proper info, and the "re-check configuration" script will run fine. And we will not have created something too strange that we can't figure it out again later on.

Sat, 12/17/2016 - 13:16

seems this is quite an old post, but actually you'll more than likely want to go into the /etc/network/interfaces.d directory and edit whatever config file is there because chances are it is set to use dhcp so for example mine would look like this now after making the changes:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
Mon, 12/19/2016 - 13:25

We're with Digital Ocean on Ubunto LTS 16.04.

The FAQ posts here says not to change the resolve.conf file but it is the only thing that works. Is there any update on this ? Thanks

Mon, 12/19/2016 - 19:36 (Reply to #36)
Joe's picture

The FAQ is talking about a specific situation, where DHCP is resetting the resolver each time the network is changed or the system is rebooted. resolv.conf is the usual way to alter the resolver configuration (and what Virtualmin needs to work), it is only something you don't change, if you're system is getting its IP and DNS resolver information from DHCP. That is not usually the case with dedicated hosting servers (and by "dedicated hosting server", in this context, I mean any server, whether virtual or physical, that is dedicated to the job of hosting websites and has a fixed public IP address).

If changing resolv.conf has sorted things out, and you're able to use the preview function in Virtualmin, you've got it right! (The only concern is if it stops working again after a reboot or network change.)


Check out the forum guidelines!

Tue, 12/20/2016 - 16:44 (Reply to #37)

Ok thanks Joe. It is working now and once I did a refresh of the system I haven't seen the configuration refresh button since. I will monitor, thanks.

Mon, 12/19/2016 - 16:27 (Reply to #39)

When I updated the DNS list it did not seem to hold in the list. It seems I had to do 3 things that finally made it work but I do not know which one.

I added the code as described above to dhclient-eth0.conf file and then /etc/dhclient.conf file. (created them both using nano). Then I followed Greentrees above: This worked for me:- System Settings / Virtualmin Configuration / Advanced Options / Check resolv.conf for this system ? - Set it to No

(even though the faq on Virtualmin says " This is a non-ideal setting, and will cause DNS lookups on your server to be slower than they need to be. Since it causes all DNS lookups to go through your provider, it also means updates to your servers DNS all have to wait for your ISP's DNS cache to clear before you will see those updates. Unfortunately, some providers don't give you another option -- and in that case, this setting should get you up and running.")

I guess I'll have to remove one by one and see which is the cure.

Mon, 12/19/2016 - 17:19
Diabolico's picture

You can go with more spartan way but it works and only affect resolv.conf.

So here is what you need to do:

  1. Create new folder at / or use /root. Any of this two options should work.
  2. Create new file and name it resolv.conf. Once done edit that file with data what you want/need. Save and close.
  3. Open the file rc.local and add to the bottom "/bin/cp /root/resolv/resolv.conf /etc/resolv.conf". In case you used some other folder to store resolv.conf change "/root/resolv/resolv.conf" to match your path.
  4. Reboot your server and from now on you wil always have resolv.conf file with needed lines.

P.S. This was tested on Centos 6 and 7, not sure for other OS. Make backup before any change and with this solution no need to edit any other file, e.g. free to revert all changes back to original state.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Mon, 12/19/2016 - 18:44

Thanks I don't know what you mean by 'spartan way'. I looked over your steps, might be too advanced for me at this stage - really new to this. I hope there isn't any danger of the way I did it. Also I'm running Ubuntu.

Mon, 12/19/2016 - 19:25
Diabolico's picture

OK let me see if i got right, you have a problem with rc.local because it gets overwritten during server reboot? If this is correct what changes you need to have in rc.local? If is something else could you clarify what exactly is your problem. I'm not using Ubuntu but many solutions from Centos works in Ubuntu, so maybe i could help.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Tue, 12/20/2016 - 16:45

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.

Wed, 01/11/2017 - 04:59

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.


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

Sat, 07/14/2018 - 20:04

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 and it seems to have solved my problem:

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, 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.

So many answers, so few questions.

Sun, 07/22/2018 - 06:48 (Reply to #47)
Sun, 07/22/2018 - 12:36 (Reply to #48)

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

So many answers, so few questions.

Sat, 11/24/2018 - 08:33

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 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.

Tue, 10/01/2019 - 14:30

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 i have Changed that to It passes validation and works until server restarts. It resets back to after restart. Will look into this further.

Tue, 10/01/2019 - 17:01 (Reply to #51)

USE chatr + command for that file.

Topic locked