change subnetmask

chow

Verified User
Joined
Aug 27, 2003
Messages
123
Location
The Netherlands
Hi,

On one of the server the subnetmask is not correct. How can I change that without removing and adding them??
 
The easies way is to remove it/them and re-add, but if you must. You will have to modify the subnet for that IP everwhere where it is stored. Ranging from DirectAdmin's data files to any other places they might be stored.
 
Actually the easiest way is:

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.

Note that while this command has been tested locally, I do NOT accept responsibility for the results of this command on your system.

Jeff
 
Back
Top