Network setup

Installed Virtualmin GPL on Debian 5. Upon configurateing network settings (like changeing DNS Servers) when "Apply" button is pressed, whole Virtualmin / Webmin just dies. Have to restart the machine, and settings are not saved.

Status: 
Active

Comments

Joe's picture
Submitted by Joe on Sat, 08/01/2009 - 17:53 Pro Licensee

So, there are a few things at work here.

One of them is that you don't need to apply changes for most network configuration changes (definitely not for DNS Servers).

The other issue is that the configuration of your network is either incorrect, or requires things outside of the normal network configuration tools on Debian to be setup (so, if your system is a virtual machine of some sort, the network probably is not under the control of the local configuration and so restarting the networking service will break things). When you apply changes, it runs the networking initscript...if that can't correctly restart your network (either due to misconfiguration, or the network not being under control of the local system), then obviously you won't have a network after it runs.

The former is probably a bug-like behavior in the Network Configuration module. It probably shouldn't imply that all changes need to be "applied", because only a handful of changes require a restart of the networking initscript.

The latter, on the other hand, almost certainly isn't something we can solve. If running "/etc/init.d/networking restart" on your system breaks your network, then you either have a misconfiguration, or you cannot manage the network from within the virtual machine. Neither is an issue we have any control over.

Well, yeah... Machine is a virtual machine (Sun VirtualBox). Tried also this on Ubuntu 8.04 LTS where after applying changes I lose my DNS change configuration, but do see in the console window the restart script being run.

Joe's picture
Submitted by Joe on Mon, 08/03/2009 - 02:15 Pro Licensee

Actually a VirtualBox looks like a real machine to the system running within it. I don't think it requires any special configuration on the outside, and I would think restarting a correctly configured network would work fine on a VirtualBox (but I'm not entirely sure of that, as I don't have a huge amount of experience with it).

So, it comes down to your network configuration being wrong. If you run /etc/init.d/networking restart from the command line, it would also break the network. This isn't a Webmin thing. Webmin is just calling the system network script to restart it (which has the effect of applying any changes you've made in the UI).

Note that if your network is configured to get DNS from DHCP (as would be the default in a VirtualBox image), you would see your DNS changes being overwritten every time you restart the network; the DHCP client is rewriting the resolv.conf file. That's expected behavior. You'd need to switch to static (non-DHCP) configuration, or explicitly tell DHCP to leave your name server information alone.