If it’s a VPS, it might be that the hypervisor your host uses assigns the server’s IP address(es) using DHCP with IP address reservation(s). That would cause /etc/resolv.conf
to be overwritten on every boot.
Check /etc/resolv.conf
and see if it has a line nameserver 127.0.0.1
in addition to the upstream resolver entries. If not, then add the line and restart BIND and Webmin. If that fixes the problem, reboot the server and check /etc/resolv.conf
again. If the line is gone, then that’s what happening.
The fix in that case would be to re-add the line and make the file immutable by executing
chattr +i /etc/resolv.conf
as root. That will make the file unchangeable, even by root. If you ever do need to edit it (for example, if the upstream resolvers change), then you’ll have to execute
chattr -i /etc/resolv.conf
If you have more than one IP address, using DHCP to assign them might also result in the IP address(es) other than the primary one losing their interface associations on reboot. If, for example, you use a second IP for NS2, or for mail, then the service associated with that IP would be unavailable after a reboot. The IP might or might not respond to a ping, but the service would not.
In other words, if you have NS2 on the impossible IP4 of 999.999.999.999, then
ping 999.999.999.999
might or might not be successful, but
ping NS2.example.tld
definitely would not.
In that event, the interface assignment for the additional IP address(es) would also have to be re-created at boot, using any of a number of inelegant methods that would depend on the underlying OS.
Richard