How can I change main IP address using ssh

Stuart Brown

Registered
Apr 10, 2017
2
0
1
United Kingdom
cPanel Access Level
Root Administrator
Stupid me, I changed the main IP address of my VPS in WHM.

Now when I login to WHM I get the CPanel License Activation page because the new IP Address does not have a CPanel License.

Is there any way of using SSH to login and change a config file somewhere to change the IP Address back to what it was please?
 

Stuart Brown

Registered
Apr 10, 2017
2
0
1
United Kingdom
cPanel Access Level
Root Administrator
I can't change the IP address in the control panel because I can't login into cpanel! There's no way to do this from my hosting companies website either.

I have five files that have a change date of today in /etc/sysconfig/network-scripts:
ifcfg-venet0
ifcfg-venet0:0
ifcfg-venet0:1
ifcfg-venet0:2
ifcfg-venet0:3

They relate to the four IP addresses I am using.

ifconfig doesn't give me any more information than what's in those files
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello,

The cPanel license is IP-based. You can see which IP address your server is making outgoing connections from with one of these commands:

Code:
curl -L http://cpanel.net/showip.cgi
lynx -dump http://cpanel.net/showip.cgi
If you need to change the IP address used for outgoing connections, then you'd have to make manual modifications to the network scripts on your system. Here's a thread where this is discussed:

Changing the main server IP and sites on server will not load

However, if you are unfamiliar with these files, I recommend reaching out to your provider for help making the network configuration changes.

Thank you.