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,268
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,268
463

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
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,268
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:

amitkalra

Active Member
Mar 9, 2006
32
4
158
Hi I have a similar issue

In our Dedicated Server we restored the Server from Cpanel Alamalinux Image yesterday.
Our server has 3 IP Addresses:
135.181.136.169 (Primary)
135.181.136.141
135.181.136.142

The Cpanel license is Valid on the primary IP i.e 135.181.136.169
After the restore somehow the Cpanel is checking for license on the second IP Address
i.e 135.181.136.141 and failing validation and not allowing WHM / CPanel Access.
Please help us fix this as we cannot access our WHM and clients cannot access their
cpanels.

I have already created a ticket.

Regards
Amit Kalra
 

amitkalra

Active Member
Mar 9, 2006
32
4
158
I have created a ticket now #
95078260
For now we have closed the two secondary IP Addresses with these commands
ifconfig eno:cp1 down
ifconfig eno:cp2 down
and now the outgoing calls are going out from the correct main IP Address.
# curl -L http://cpanel.net/showip.cgi
135.181.136.169
We needed to do this to be able to access WHM and could access WHM and grant Access to Cpanel Support.
We want to Make the primary IP Address fixed permanently and re-enable the two secondary IP Addresses ASAP.


When the two secondary IP Addresses were enabled the output was this:
# curl -L http://cpanel.net/showip.cgi
135.181.136.141
 

amitkalra

Active Member
Mar 9, 2006
32
4
158
We got a response from Cpanel Support Ticket #95078260

The issue happened because the Netmask was incorrect for the One Primary and 2 Secondary domains.
In fact for all three IP Addresses the correct Netmask was 255.255.255.192 but it was configured wrongly as 255.255.255.255
I could delete the 2 Secondry IP Address and Add them again through the correct Subnet Mask in WHM-Ipfunctions

The primary domain is being used for all 46 Client domains and the first name server too.
I am just exploring the best way to fix the Netmask of the primary domain.
I have updated the ticket with Cpanel Level 3 Support.
Any ideas on what would be the best way to get this done.
Through WHM it won't be possible to delete the IP as it is primary and in use.
If we change the Netmask after connecting through SSH through the Secondry domain will be remain connected ?

Regards
Amit