Hmmm… so far i’m only using a single ip for our server, maybee it’s better to drop that one and swap over to the new ip-range and all the new network settings. But i’m not shure which files(through ssh) to edit, or how to do that in webmin without beeing disconected from either ssh or webmin.
Ah, the old “I don’t wanna break it” conundrum. Valid concern.
If I were in such a situation, I’d probably leave the old address running until I’d tested the configuration of one of the new addresses. The best bet is to bring it up on a virtual device (e.g. eth0:1) using the Interfaces Active Now section of the Webmin Network Configuration module. And then after you’re pretty confident you’ve got it right, you can swap the configuration between eth0 and eth0:1, on the Interfaces Active Now. At this point, if you lose connectivity, a reboot will bring eth0 back to life with the old IP (because we didn’t modify any of the on-boot configuration files). Or, if you don’t lose connectivity, you’ll know you’ve got good configurations, and you can copy them over to the Interfaces Activated on Boot (double-checking them before actually applying the network configuration changes).
The files that you’re interested in on Red Hat based systems are /etc/sysconfig/network-scripts/ifcfg-eth*, as you’ve surmised. You can use ranges, in fact, that’s how our addresses are configured on Virtualmin.com. Here’s our eth0 range definition (there is also a ifcfg-eth0 def for the primary IP address):
[[virtualmin@www documentation]]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_END=70.86.4.238
GATEWAY=70.86.4.225
CLONENUM_START=0
DHCP_HOSTNAME=www.virtualmin.com
BOOTPROTO=static
IPADDR_START=70.86.4.227
TYPE=Ethernet
HWADDR=00:12:3F:D2:94:70
NO_ALIASROUTING=yes
DEVICE=eth0
NETMASK=255.255.255.240
ONBOOT=yes
The magic is in the IPADDR_START= and the IPADDR_END fields.
I don’t actually know what some of those values mean, but they seem to work for our system (and we do have several IPs in use for SSL and other services). Webmin does support this type of network definition–and you can also create ranges of addresses using the Webmin network configuration module by clicking the “Add a new address range.” link at the bottom of the Interfaces Activated at Boot Time section.
So, in short:
Get the eth0 interface running right with Interfaces Active Now (so you can reboot to the old config if you break something).
Copy it to the Interfaces Activated at Boot Time, if you know you’ve got it right.
Add the new range using the Add a new address range feature.
Configure Virtualmin not to bring up interfaces.
All done! And with minimal risk of disconnecting yourself in ways that would require (much) humand intervention. I’m assuming your web host provides unlimited remote reboot service for free, of course…