Linux IP management

# ifconfig eth1 192.168.10.12 netmask 255.255.255.0

# cd /etc/sysconfig/network-scripts

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

DirectAdmin: 

a) log in through ssh and su to root
b) navigate to /usr/local/directadmin/data/admin/ips
c) edit the file for the IP you need to change the netmask on.
d) run the following two commands on one line:

# /etc/rc.d/init.d/network restart ; /etc/rc.d/init.d/startips start

Be sure you don't make a mistake on that last single-line command or you could find yourself locked out of your server and/or all the IP#s managed by DirectAdmin.

Tags: Linux DirectAdmin