Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a strange issue with my vps, it's running CentOS 6 and WHM, today i purchased the license after expiration but i can't activate it because the /usr/local/cpanel/cpkeyclt uses the non primary IP address to look up.

I have 4 IP addresses and the activation thing uses the last one even though it's not the primary, it's a dedicated IP for some account.

Also when i run as a root: lynx -dump http://www.cpanel.net/showip.cgi it shows the non primary ip too (ifcfg-eth0:2).

My IP setup is this:

ifcfg-eth0   -> contains the primary IP
ifcfg-eth0:0 -> contains 2nd IP
ifcfg-eth0:1 -> contains 3rd IP
ifcfg-eth0:2 -> contains 4th IP ( this is the one WHM uses to lookup the license! )
ifcfg-eth0:3 -> contains the local IP address

How can i make it use the first primary IP address?

My ethernet files are like:

DEVICE="eth0"
ONBOOT="yes"
BOOTPROTO="none"
IPV6INIT="no"
IPADDR=49.164.222.229
NETMASK=255.255.255.0
GATEWAY=49.164.222.1

DEVICE="eth0:0"
ONBOOT="yes"
BOOTPROTO="none"
IPV6INIT="no"
IPADDR=28.126.111.126
NETMASK=255.255.255.0
GATEWAY=28.126.111.1
...etc...

UPDATE:

It seems that the server picks a random IP address from my ifcfg-eth files everytime the network starts up, I resolved the issue by restarting the network several times and checking the current IP until it matched the actual main IP address. I'm still looking for a real solution!

Thanks

share|improve this question
3  
You'll need to get in touch with cPanel via ticket: tickets.cpanel.net/submit/index.cgi?reqtype=tickets –  gekkz Dec 21 '11 at 10:07
    
You shouldn't be using named interfaces for secondary IP addresses. The superior ip addr add method has been available for many years. –  David Schwartz Dec 21 '11 at 15:49
    
What's the IP in /var/cpanel/mainip ? –  garconcn May 17 '12 at 20:48

1 Answer 1

Set the default gateway only for 1 interface alias. In that case all your outgoing connection will use this address.

If you need to balance outgoing connections - you need to set up proper routing with multiple routing tables and rules.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.