SOLVED Problem changing the primary IP

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
Hello everyone,
We just changed our server's primary IP address due to some problems with the old IP.
The problem is, the command curl -L http://cpanel.net/showip.cgi still returns the old IP. but ifconfig shows the new IP as server primary IP address.
Files that we edited and added the new IP:
Code:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/wwwacct.conf
/etc/hosts
/var/cpanel/mainip
Is there any other places to modify?
We are running CentOS 7 + Cpanel 74 .
Of course the network service is already restarted.
 
Last edited:

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
At least some one please tell me how can I change the shared IP for all accounts?
The "Change Multiple Sites' IP Address" needs to select each domain and change the IP for every single one of them. It takes too long!
There is not even a Sellect All option in there!
 

Infopro

Well-Known Member
May 20, 2003
17,076
523
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Are all accounts under the same Reseller?
WebHost Manager »Resellers »Manage Reseller’s Shared IP
Manage Reseller's Shared IP - Version 74 Documentation - cPanel Documentation

WebHost Manager »Server Configuration »Basic WebHost Manager® Setup, Basic Configuration
Basic WebHost Manager Setup - Version 74 Documentation - cPanel Documentation

Required
A single IPv4 address to function as the server's shared IPv4 address. All of the accounts on your server that do not require a dedicated IPv4 address may use this IP address.
 

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
Thank you @Infopro
But as mentioned in the "Manage Reseller's Shared IP" section, it does not affect existing accounts:
Note: This change does not affect accounts that already exist. These accounts can be updated to the new shared IP using the “Change Site’s IP Address” interface.
Is there any command to change the shared IP for all the existing accounts using ssh?
 
Last edited:

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
Finally managed to change the primary IP.
The problem was the eth0 backup file (ifcfg-eth0.backup) !
I removed it and everything is working now.
 
  • Like
Reactions: Infopro