Problem changing server IP address from console.

seanohlrich

Registered
Feb 4, 2008
2
0
51
I have been a loving fan of your software for years now and have been trying to move into a new dedicated server, getting away from my VPS I have been anchored to. I had to change static ip's on my main internet line and thus got locked out of my server from the outside. I have the box here and I can console into it but I cannot get the new ip address to work. I have tried so many things it would waste more time than asking for the correct answer.

I know you are wise in the ways of the server as you have gotten me out of a jam in the past. I am currently running Centos 5.4 and a trial version of WHM/cPanel (which needs to be re-registered to the new address if I can ever get back online.)

Please tell me you know a magic trick to get this to start working.

Thanks for listening. Hope you can help.
 

seanohlrich

Registered
Feb 4, 2008
2
0
51
Verifying network settings

What would be the required files to check or commands to run in order to completely reload a new single ip address for the server? Centos 5.4/WHM/cPanel? I verified the ip information in what I knew to check but I'm sure that I am not doing it properly or in the right places.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
What would be the required files to check or commands to run in order to completely reload a new single ip address for the server? Centos 5.4/WHM/cPanel? I verified the ip information in what I knew to check but I'm sure that I am not doing it properly or in the right places.
I recommend checking with on-site data center staff or network engineering personnel as they should know or be able to obtain with absolute certainty the correct network mask, network gateway, broadcast address, and routing configuration to setup on the system.

For reference, the primary IP address and any optional secondary IP addresses are defined in the usual places you would expect on a Linux system; the following details should help to clarify further:

For the primary IP address of your main network interface of the system:
Directory Path: /etc/sysconfig/network-scripts/
Example (where the interface is named "eth0"):
/etc/sysconfig/network-scripts/ifcfg-eth0

The above example file would contain (at minimum) the following relevant entries:
Code:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=<ip>
NETMASK=<netmask>
GATEWAY=<gateway>
Note: Replace the <variables> with the actual value needed (without keeping the less-than/greater-than signs). :)

For optional secondary IP addresses:
File Path: /etc/ips
Example (one on each new line):
Code:
<ip>:<netmask>:<broadcast>
Secondary IP addresses are read from the above file and initialized via the following script:
Code:
# /etc/init.d/ipaliases
Usage: ipaliases {start|stop|restart|reload}