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.

IP Address Pool Problem

Discussion in 'General Discussion' started by myce, May 9, 2005.

  1. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Almost a year ago, I upgraded my RackShack (EV1) server. Prior to that, I never had any problems with my IP address pool. But shortly after my new server was brought online, it was hacked/rooted, and EV1 had to restore it for me. At the time, I was told that EV1 support was having to "manually" reload cPanel due to a bug in their automated restore scripts. And, ever since the restore, I have had a problem with the IP address pool turning "red" within WHM anytime the server is rebooted. The IP numbers are listed as "green" in the IP Address List prior to the reboot, but turn red and must be deleted and re-added in WHM before they will be functional again. Does anyone here know what I need to do to fix this problem permanently? Not only is it a pain to have to re-add the IPs everytime, but it causes website downtime when the server is rebooted.

    Btw, my server is assigned a subnet mask of 255.255.254.0, but WHM assumes a default of 255.255.255.0. When I delete and re-add the IPs (after rebooting and they've turned from green to red), I always override the default setting with 255.255.254.0, but is there anyway to edit the WHM configuration so that it defaults to 255.255.254.0?
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Being hacked is a very typical EV1 problem. It seems that the file where the IPs are saved, get corrupted during rebooting. Now, you need to stop the system from writing to it. SSH to your server and do the following:
    chattr +i /etc/nameserverips

    Hope this helps!
     
    #2 AndyReed, May 9, 2005
    Last edited: May 9, 2005
  3. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Andy, I tried your suggestion and rebooted, but all IPs (except the master IP) are still turning "red" and must be deleted and re-added. Any other ideas?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, the IP addresses are saved in /etc/ips and the virtual network controllers are created by the script /etc/init.d/ipaliases

    What do you get with:

    chkconfig --list ipaliases

    It should be:

    ipaliases 0:eek:ff 1:eek:ff 2:eek:n 3:eek:n 4:eek:n 5:eek:n 6:eek:ff

    After rebooting, have you tried manually running /etc/init.d/ipaliases to see if that starts up your addon IPs for you? If it does, then I rmember seeing someon else having this problem and a cPanel upgrade seemed to fix it.
     
  5. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Jonathan, my results are as follows:

    chkconfig --list ipaliases

    ipaliases 0:eek:ff 1:eek:ff 2:eek:n 3:eek:n 4:eek:n 5:eek:n 6:eek:ff

    /etc/init.d/ipaliases restart

    Shutting down eth0:1 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.100 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:2 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.101 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:3 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.102 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:4 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.10 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:5 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.1 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:6 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.137 SIOCDELRT: No such device
    [FAILED]
    Shutting down eth0:7 SIOCSIFFLAGS: Cannot assign requested address
    [FAILED]
    UnRouting xx.yy.1.144 SIOCDELRT: No such device
    [FAILED]
    Bringing up eth0:1 [ OK ]
    Routing xx.yy.1.100 [ OK ]
    Bringing up eth0:2 [ OK ]
    Routing xx.yy.1.101 [ OK ]
    Bringing up eth0:3 [ OK ]
    Routing xx.yy.1.102 [ OK ]
    Bringing up eth0:4 [ OK ]
    Routing xx.yy.1.10 [ OK ]
    Bringing up eth0:5 [ OK ]
    Routing xx.yy.1.1 [ OK ]
    Bringing up eth0:6 [ OK ]
    Routing xx.yy.1.137 [ OK ]
    Bringing up eth0:7 [ OK ]
    Routing xx.yy.1.144 [ OK ]
    root@server1 [/]#

    After running this script, the IPs do turn green again in WHM. FYI, I am running WHM 10.1.0 cPanel 10.2.0-C81 and RedHat Enterprise 3 i686 - WHM X v3.1.0 (CURRENT tree). Any idea what upgrade I might need to apply or why I'm getting the above alert messages?
     
    #5 myce, May 10, 2005
    Last edited: May 10, 2005
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The errors aren't a problem, that's because you did a restart, but at least the IP's are back up.

    I don't know what version would be best, but I'd suggest having a go with EDGE and see if that helps, if it doesn't you're probably best logging a ticket with cPanel.
     
  7. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    I kind of doubt that going to Edge will solve this since I have been running Automatic Current for the past year. My "guess" is that when EV1 manually installed cPanel after restoring my server that "something" was not configured properly. But, everytime I submit a support ticket to them, they say; "Just delete and re-add the IPs in WHM!" as if that is an acceptable solution!! :mad: Obviously, my virtual network controllers are not being created automatically at system boot! :confused:
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    What is the OS?
    Now, when you rebooted the server, did you restart bind, before adding the IPs? Did it work? If not, any error messages: /var/log/messages?
     
  9. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Andy, I'm running RedHat Enterprise 3, and I did NOT restart bind before adding the IPs via /etc/init.d/ipaliases start. The only messages in the message log were the ones I noted earlier, although I'm still looking at messages during the reboot for clues.
     
  10. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    hes running RedHat ES3

    Anyhow, your getting this because the shutdown script isn't reading the ips properly from /etc/ips for some reason, are they all in there? and listed properly? I kinda recall it being due to the : in there but I dunno

    I think I had this very problem before, but I cant seem to remember what I did, let me dig some more.
     
  11. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Yes, all the IPs look good in /etc/ips.
     
  12. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Do you have anything in here?

    /etc/sysconfig/networking/devices/

    Can you aim me, my aim thing is public i think, im going to make it if its not.
     
  13. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    No, nothing in /etc/sysconfig/networking/devices/.
     
  14. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    ok, then see if this works for you

    create a file this part of the name is for your reference, its pretty much irrelevent as it gets looked at by the networking script at boot, which doesnt care what the name is.

    Code:
    touch ifcfg-eth0\:1
    then edit it with fav. editor

    and put this in, making necessary adjustments,
    if you have multiple addresses, make a new file, this is how the script works, 1 per file.
    Code:
    
    BOOTPROTO=none
    DEVICE=eth0:1
    NETMASK=255.255.255.255
    MTU=1500
    BROADCAST=xxx.165.xxx.98
    ONPARENT=yes
    IPADDR=xxx.165.xxx.98
    NETWORK=xxx165.xxx.98
    ONBOOT=yes
    
     
  15. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Run these commands at the prompt:
    ifconfig eth1 | grep YOUR_MAIN_IP
    Then
    netstat -rn | grep YOUR_MAIN_IP

    Post the results.
     
  16. Kaveyhosting

    Kaveyhosting Well-Known Member

    Joined:
    Apr 20, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    If all else fails and you think its something with cpanel rebuild cpanel and then rebuild apache.

    /scripts/upcp --force

    /scripts/easyapache
     
  17. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    pshepperd, just to be clear, I'm assuming I should use NETMASK=255.255.254.0 since that is my subnet mask. Also, I'm assuming from your example that I'll have one file for each IP address, and I'm to to put the IP address in the BROADCAST, IPADDR, and NETWORK parameters?

    ------------------------------------------------------------------------------------------------------------

    Andy, after running:

    ifconfig eth1 | grep YOUR_MAIN_IP

    eth1: error fetching interface information: Device not found

    netstat -rn | grep YOUR_MAIN_IP

    root@server1 [/]#
     
  18. Kaveyhosting

    Kaveyhosting Well-Known Member

    Joined:
    Apr 20, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    ifconfig eth0 | grep YOUR_MAIN_IP
     
  19. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    ifconfig eth0 | grep YOUR_MAIN_IP

    inet addr:xx.yy.0.72 Bcast:xx.yy.1.255 Mask:255.255.254.0

    Also, I have run easyapache, but I don't think I've tried a complete reinstall of cPanel.
     
  20. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I want you to run the two command I gave you below right after reboot. I suspect you have either IRQ conflict or hardware problem.
     
Loading...

Share This Page