License verification using wrong IP

Stavro

Member
Aug 5, 2018
7
0
1
United States
cPanel Access Level
Root Administrator
My VPS has three IPs, and my license was applied to the main server IP.

Today, after an update and reboot, cpanel is saying that I am running on a trial license, and the IP address is one of my secondary IPs.

For reference, the three IPs are as follows:
1.2.145.63
1.2.199.51
1.2.199.58

145.63 is the main server IP, which according to verify.cpanel.net, has an active paid license. But after today's reboot, the 'trial license' error says I must buy a new license for 199.51.

The WHM setup page is still showing 145.63 as the primary IP, all the sites associated with 145.63 work fine, and the ip addr command still shows that 145.63 is assigned to eth0, so I have no idea why the licensing server is now ignoring my primary IP.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Stavro,

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.
 

Stavro

Member
Aug 5, 2018
7
0
1
United States
cPanel Access Level
Root Administrator
Thank you for the reference, but it didn't really help my situation.

Edit /etc/sysconfig/network-scripts/ifcfg-eth0
This file remains at the proper values. 145.63 is still the main IP.

Edit /etc/sysconfig/network
The default IP is still 145.63, and the default gateway is still 145.1

Edit /etc/ips
This file is blank. Since the instructions are to remove the new IP, I'm unsure if I should add the main IP, or leave it blank.

Edit /var/cpanel/mainip
The default IP is still 145.63

Edit /etc/hosts
145.63 is still listed as the hostname IP.

All services have been restarted, though I don't see the point as no files were changed. And ifconfig still shows 145.63 as the primary IP, attached to eth0, with the secondary IPs attached to eth0:0 and eth0:1.

curl -L http://cpanel.net/showip.cgi still shows my IP as 199.51, and WHM is still showing a trial license notification.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Stavro,

We typically avoid offering assistance with modifications to a server's network configuration because that's considered to be under the scope of a system administrator, however I'm going to try to point you in the right direction since this a common change. I found a link with a solution that seems to address the exact issue you are facing:

Centos configure outbound IP address

Can you let me know if that helps?

Thank you.
 

Stavro

Member
Aug 5, 2018
7
0
1
United States
cPanel Access Level
Root Administrator
I understand the policy, but I respectfully disagree that issues directly caused by a cPanel update should be outside the scope of cPanel support.

My server was working perfectly fine before the update, and none of the network configuration files have changed at all, it was the update itself that caused the issue.

The ip route show command from your link shows that the default outgoing IP is 1.2.145.63, as it has been all along, yet the licensing server is still reporting back with 1.2.199.51.

On the advice of my hosting provider, I'm going to migrate my sites to another VPS, wipe this one, and reinstall/update cPanel. If the issue occurs again, I'll repeat the process and try to determine exactly which of the cPanel update packages is causing my IP to switch.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Stavro,

I've added a note to the support ticket explaining this happened after a cPanel update so we can investigate to rule any cPanel-related issues that may have caused this to happen. If this is okay, could you reply to the support ticket to confirm that you want us to take a closer look (I don't want to interfere with an active migration if that's something you've already started).

Thank you.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
since this is a VPS the network is likely being reconfigured
by the VPS control panel back end on reboot

check your eth0:0 & eth0:1 @ /etc/sysconfig/network-scripts
and see if it adds the
GATEWAY=
line

if it does remove the gateway lines from your 2 alias ip's
and restart your network
and see if your issue goes away

Linux likes to go outbound on the lowest number ip address when there is a gateway listed in all eth0 devices in this case .51

since your IP's are on 2 different subnets


there was no need to wipe anything
it will likely do it again at some time
if you have IP's on different subnets
 
Last edited: