Virtualmin with DHCP assigned server IP address

Hi there,

The datacenter company I have been using for many years has opened up a new datacenter which has slightly different infrastructure to their existing datacenter.

In both datacenters, both dedicated servers and VPS servers are provisioned automatically. This also means that from my customer control panel I can re-install any of my servers simply by selecting the server and requesting a re-install which is done completely automatically, which is a great feature.

In the old datacenter, the networking was automatically set up correctly with static IP addresses, the correct default gateway and the correct DNS servers populated into resolv.conf, which was great.

In the new datacenter, they have become a little too clever! They have obviously set up a DHCP server which allocates IP addresses according to MAC address of the NIC of the server, they are also using this to issue default gateway as well as DNS server addresses. The network configuration is correct and the server always received the correct network configuration every time, but Virtualmin does not like the DHCP setup - I get the message:

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. It appears that DHCP is being used to dynamically configure your network interfaces, which can cause the DNS servers to be set based on settings provided by the DHCP server. Using a static IP address is strongly recommended with Virtualmin.

I know I can manually switch the server to using a static configuration, but is there any reason Virtualmin could not cater for the above configuration using DHCP?


If your server is designed to be used as a nameserver, it should itself as a nameserver within /etc/resolv.conf.

As you saw, using DHCP causes the nameservers to be overwritten.

There are some thoughts on how to resolve that in the section “Received Virtualmin error that isn’t listed in /etc/resolv.conf” here:

If you don’t need your server to act as a nameserver for the domains being hosted on it though, you could always disable the “BIND DNS Domain” feature in System Settings -> Features and Plugins.