The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Brand new WHM 11.44.1 VPS, additional IPs don't stay

Discussion in 'General Discussion' started by Ark, Jul 31, 2014.

  1. Ark

    Ark Member

    Joined:
    Dec 18, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I set up 4 sites, 3 on the main IP, and a 4th on a second dedicated IP because it needs SSL. Later, I noticed that the 4th site was not reachable.
    "/etc/init.d/ipaliases restart" does not help. "ifconfig" shows that the IP is not bound anymore. The IP is still listed in /etc/ips. Only if I remove the line from /etc/ips can I use IP Functions » Add a New IP Address to add it back in WHM, but it does not stay for long. Rebooting, or doing something like "/etc/init.d/ipaliases restart" actually causes it to be *removed* and it says "UnRouting x.x.x.x [ OK ] / Shutting down eth0:cp1 [ OK ]"

    What can I do to get the extra IP to stay? I'm certainly not going to SSH in after each reboot, delete /etc/ips, and then go to WHM and re-add the IP to set it up, every time.
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    This might work, from a shell, find out which eth the IP is bound to then run ( example)
    ip link set eth1 up
     
  3. Ark

    Ark Member

    Joined:
    Dec 18, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    That command does nothing. I know 'ifconfig' will show the current devices and virtual devices, and the extra IPs should be on eth0:cpX but ifconfig only shows eth0 (main shared IP) and "lo" for localhost IPs. I've Googled around and people having similar issues are all told in other thread that "/etc/init.d/ipaliases restart" will help, and for other people, it seems to. But for me, "/etc/init.d/ipaliases restart" actually will specifically *remove* the extra IPs.
     
  4. Ark

    Ark Member

    Joined:
    Dec 18, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    A little bit of digging shows that /var/cpanel/mainip is 0 bytes and last modified March 26 (long before this VPS even was started) -- this causes /etc/init.d/ipaliases to grep against "\b\b" in the start) section, thus basically ignoring everything in /etc/ips ...
    How is mainip supposed to be populated?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    What method did you use to add the IP address? Did you modify files within /etc/sysconfig/network-scripts or did you simply use Web Host Manager?

    Thank you.
     
  6. Ark

    Ark Member

    Joined:
    Dec 18, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It was added via WHM at IP Functions » Add a New IP Address with a 255.255.255.255 subnet.
    In fact, nobody SSHed into the VPS with any account, root or otherwise, until I noticed the 4th site dropped off the Internet.

    As a work-around, I did find that /var/cpanel/mainip would be regenerated by /scripts/mainipcheck but *only* if I deleted it first. /scripts/mainipcheck wouldn't do anything to fix the 0-byte file that came out of the box from GoDaddy's setup. The VPS was purchased yesterday, and although I'm the guy with root putting everything in place, I didn't pick GoDaddy as the hosting choice, so don't laugh at me for that..
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I suggest consulting with GoDaddy's support team to have them check why their VPS templates are not populating the /var/cpanel/mainip file.

    Thank you.
     
Loading...

Share This Page