Dynamic IP troubles "Hostname and DNS Client -> DNS Client Options"

Operating system: Ubuntu
OS version: 18.04.1

Typically after an update requiring a reboot I have to manually add in to my list of DNS servers in Hostname and DNS Client -> DNS Client Options.

I’ll then just for good measure re-run that Re-Check Configuration to see that all is well. It’s not anymore.

The no longer sticks in the settings for any length of time.I don’t know if this is adversely affecting anything, but so far I can’t really tell.

Any workarounds to mitigate this problem?

Resolver IPs could be changing because of some kind of dynamic networking tool provided by the hosting company. If that’s the case and you rely on static addressing you should be able to disable it. If that’s not it examine how Ubuntu’s Network Manager service interacts with its network interface files and /etc/resolv.conf. I’m not familiar with Ubuntu networking but that’s one way /etc/resolv.conf ends up overwritten by Network Manager on a CentOS system.

I’m not sure I understand your answer, but I have COVID-19 right now so my brain is on diminished capacity.

I do not have a static IP. I know it’s heavily advised against by all of Virtualmin documentation, and people who work there doing support, but I don’t have the funds for a static IP yet.

I do have software handling the dynamic IP update for me when it changes on its own now.

This problem I noticed is fairly recent. Adding to Webmin -> Networking -> Network Configuration -> Hostname and DNS Client -> DNS Client Options -> DNS servers:, was persistent until a reboot. Now it reverts to just immediately after saving the setting.

Take it easy and get well.

Meanwhile, maybe articles like these will shed some light. Keyword “” turns up quite a lot.

1 Like

Your first link led me to see this on my system:

systemd-resolve --status
         DNS Servers:

This might mean their’s something wrong with the way Virtualmin is recognizing it’s preparedness for use when I run Virtualmin -> System Settings -> Re-Check Configuration

My resolv.conf file looks similar to this and Virtualmin agrees with it (the localhost nameserver with a couple public ones). Are you running your own DNS server?

On a CentOS system, a dirty but workable kludge would be to make /etc/resolv.conf immutable while the file is in the desired state. I think (but am not sure) that it would work for Ubuntu, as well.

It’s certainly not the preferred way of doing things – disabling or reconfiguring whatever is hosing the configuration would be the right way – but it should work as a workaround while you’re figuring that out.

chattr +i /etc/resolv.conf

would prevent the file from being changed, even by root. If root ever needs to change it, then

chattr -i /etc/resolv.conf

would have to be run first.



If there’s not an obvious problem and names are resolving, the description above has me wondering if you’re running your own DNS or if it’s hosted somewhere else (hosting provider, registrar…). If DNS is external nameserver is an obstacle and needs to be left out.

BIND is running on my system, but after extensive attempts, I couldn’t get everything to work correctly, so I put much of my content back to the DNS sections on https://domains.google.com/

I don’t understand that entirely, but I am having a newly discovered problem with my Collabora Office via my Nextcloud server. It uses proxy pass off a port on to operate. The rest of my sites appear to be fully operational, but I don’t really want to test every facet of every site right now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.