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 Aliases,SSL and add New IP Address

Discussion in 'General Discussion' started by sclayton, Jul 27, 2005.

  1. sclayton

    sclayton Member

    Joined:
    Jun 15, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Can someone explain to me what "Add New IP Address" is supposed to do in the "IP Functions" section of WHM?

    I think it should setup ip aliases, i.e. eth0:0, the reason I ask is because I set one up and both my primary IP address and the new ip address where accessible from the internet, but after a reboot the new ip address was gone and I could not see it when issuing the ifconfig command from ssh. I manually recreated /etc/sysconfig/network-scripts/eth0:0 and all was ok again, should cPanel create this script for me?

    The other part of my question relates to SSL, do I need an IP address for every domain that requires an SSL certificate or if I am using shared ip address within cPanel can I just use the primary ip address?

    thanks
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You should not create the virtual interface manually and you'll need to delete it to get things working again.

    When you add a new IP address it should create it in /etc/ips on reboot the /etc/init.d/ipaliases script reads that file and create the virtual interfaces. If that's not happening, then you could add the running of that script to /etc/rc.d/rc.local for good measure.

    Yes, you must have a unique IP address for every domain that wants an SSL certificate.
     
  3. sclayton

    sclayton Member

    Joined:
    Jun 15, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi, thanks for getting back, I found errors during boot referering to trying to setup my secondary ip address, I traced this back to the /etc/init.d/ipaliases script. The start) part of the script was starting the alias at eth0:1 and Centos 4 expects it to start at eth0:0, therefore I had to alter the script as below:


    # See how we were called.
    case "$1" in
    start)
    defaultmask="255.255.255.0"
    #dev=1 - get errors if start dev at 1, i.e. eth0:1, needs to start at eth0:0
    dev=0
    for ip in `cat /etc/ips`; do
    broadcast=`echo $ip | awk -F: '{ print $3 }'`
    netmask=`echo $ip | awk -F: '{ print $2 }'`
    ip=`echo $ip | awk -F: '{ print $1 }'`
    if [ "$netmask" = "" ]; then


    was this the correct thing to do? Also I had to add the call to ipaliases to the /etc/rc.d/rc.local file as you suggested. Something else in the boot sequence must be disabling it.

    regards
     
  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
    Odd, I've seen plenty of CentOS 4 servers that haven't had that problem. Are you running CentOS v4.1 with all the latest updates?

    If it works for you that is great, but a cPanel update is likely to overwrite your change to /etc/init.d/ipaliases, so you might want to consider logging the problem with cPanel in a ticket.
     
  5. sclayton

    sclayton Member

    Joined:
    Jun 15, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    yes, i'm running CentOS 4.1 i686, I think i'll raise a support ticket and see what they say.

    thanks
     
Loading...

Share This Page