Changing IP Netmask

hci

Verified User
Joined
Jun 15, 2004
Messages
355
I need to change the Netmask on all my IP's on a Directadmin box from 255.255.255.0 to 255.255.254.0. Is there a quick easy way to do that?

Matt
 
The following works on all DA systems running on the various Red Hat Linux operating systems:

Login through a shell, and become root.

Navigate to the /usr/local/directadmin/data/admin/ips subdirectory.

Edit the netmask line in all the files in that directory.

Navigate to the /etc/sysconfig/network-scripts subdirectory.

Edit the NETMASK lines in the ifcfg-eth0* and in the ifcfg-eth1* files as required.

Be very careful; if you make errors in the editing you could cause your machine to disappear from the network.

Then reboot the server:

# shutdown -r now

(Note that you don't type the "#"; it's only there to remind you to execute the command as root.)

Jeff
 
Back
Top