1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

add ip addresses - bulk - how?

Discussion in 'Plesk for Linux - 8.x and Older' started by madsere, Jun 19, 2005.

  1. madsere

    madsere Regular Pleskian

    26
    57%
    Joined:
    May 8, 2005
    Messages:
    200
    Likes Received:
    0
    So I'm sitting here with a new Plesk server and a class-C subnet to add ....

    How?

    You're not seriously expecting me to add each IP, 3 digits at the time in the GUI? Someone surely must have made provisions to add IP addresses in bulk from a file, right?
     
  2. madsere

    madsere Regular Pleskian

    26
    57%
    Joined:
    May 8, 2005
    Messages:
    200
    Likes Received:
    0
    6 views and no reply after a week. Does that mean it's not possible or nobody knows?
     
  3. smerkel

    smerkel Guest

    0
     
    Hello:

    The easiest way to do this is to add them within the OS, and then have PSA re-read the configuration. I had a script at one time that did this on Fedora installations, but for the life of me, I can't seem to find it.

    At any rate, here is an example for Redhat/Fedora based installations:

    - For every IP you want to add, create an aliased interface file in /etc/sysconfig/network-scripts. Here are two example files:


    #
    # /etc/sysconfig/network-scripts/ifcfg-eth0:0
    #
    DEVICE=eth0:0
    BOOTPROTO=static
    IPADDR=192.168.10.8
    NETMASK=255.255.255.255
    ONBOOT=yes

    #
    # /etc/sysconfig/network-scripts/ifcfg-eth0:1
    #
    DEVICE=eth0:1
    BOOTPROTO=static
    IPADDR=192.168.10.9
    NETMASK=255.255.255.255
    ONBOOT=yes

    - Bring both interfaces up. (ifup eth0:0 && ifup eth0:1)

    - Once both interfaces are up, click on the following within PSA.
    Server -> IP Addresses -> Reread IP.

    This brings all active interfaces into the PSA UI and database as exclusive IP's.

    There are shortcuts that you can take with Fedora/Redhat ifcfg-<interface> files, such as defining a range of IP's to bind in a single file. However, PSA doesn't like this (or at least it didn't last time I checked), so it is advisable to use a single file per IP alias.

    I hope this is useful to you.

    Regards,

    Steve
     
  4. madsere

    madsere Regular Pleskian

    26
    57%
    Joined:
    May 8, 2005
    Messages:
    200
    Likes Received:
    0
    OMG, that simple :) ... that's how I always did it with Ensim. Dunno why I didn't think of trying that with Plesk ... Thanks!
     
  5. smerkel

    smerkel Guest

    0
     
    Anytime - :cool:

    Regards,

    Steve
     
Loading...