×


Virtualmin System is not setup to use itself as a DNS server - Ways to fix it ?

Virtualmin has the ability to manage your domain's DNS when properly configured. However, it is optional to use use the domain registrar or third-party services like CloudFlare to host our DNS.

Are you trying to resolve "Virtualmin System is not setup to use itself as a DNS server" error? We can help you.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix related DNS issues.


Nature of "Virtualmin System is not setup to use itself as a DNS server" error

Sometimes in the process of trying to enable Nginx modules in the Features and Plugins after running Virtualmin post-installation wizard we may end up with the following:

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

This error is caused by DHCP.  Server Provider uses DHCP to assign IP addresses to droplets. Furthermore, while obtaining the IP address for the server  DHCP server uses the DNS servers provided by Server Provider instead of what’s currently set up on the server.

Therefore we cannot add 127.0.0.1 simply to the list of DNS servers as it will get overwritten.

However, we can fix this by adding 127.0.0.1 to the /etc/resolv.conf (list of DNS Servers) file from the command line.

We must keep in mind that it gets overwritten on each server boot-up. So we need to add 127.0.0.1 to the /etc/resolv.conf file on each boot-up.


How to fix "Virtualmin System is not setup to use itself as a DNS server" error ?

1. We will use /etc/rc.local to add a code that adds 127.0.0.1 to the /etc/resolv.conf file on each boot-up.

2. So open /etc/rc.local file from the command line as a root user.

We can use the following command:

$ nano /etc/rc.local

3. Now paste the following file before the line that reads exit 0

$ echo nameserver 127.0.0.1 >> /etc/resolv.conf

4. Finally, we will save rc.local file with the change and reboot the server.

We can use the following command for the reboot:

$ reboot


[Need assistance in fixing DNS issues ? We can help you. ]


Conclusion

This article covers method to resolve the error, Virtualmin System is not setup to use itself as a DNS server. In fact, this error happens as a result of changes in your IP address being obtained by DHCP. By default, the DHCP client will set a number of things, including the DNS servers. 

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