Need help adding additional IPs to my server and ISPconfig

Discussion in 'Server Operation' started by Been Told, May 17, 2009.

  1. Been Told

    Been Told Member

    Hi everyone.
    I have a root server with Hetzner that I set up following the perfect server setup (Debian Lenny) HowTo here on HowtoForge.
    Now I have received 6 additional IPs that I would like to use.

    But I'm really not sure what I need to do, to get this to work. Do I just enter the IP numbers in ISPconfig -> Management -> System Config -> Settings -> IP List ?
    It sounds a little too easy. :eek:
     
  2. falko

    falko Super Moderator Howtoforge Staff

    This works only if $go_info["server"]["network_config"] is set to 1 in /home/admispconfig/ispconfig/lib/config.inc.php. But I suggest that you make your changes in /etc/network/interfaces and add virtual network cards (e.g. eth0:0, eth0:1, etc.).
     
  3. Been Told

    Been Told Member

    Ok cool, thanks! I'll try this out when I get home. I take it when I add the virtual network cards it's it's the same "modus operandi" as with the eth0 configuration in the perfect setup debian lenny HowTo right?
    I've never done this before... I can't wait to try.
     
  4. Been Told

    Been Told Member

    OK I have a problem... Here's what I put inside my /etc/network/interfaces file:
    Code:
    # Loopback device:
    auto lo
    iface lo inet loopback
    
    # device: eth0
    auto  eth0
    iface eth0 inet static
      address   111.111.111.111
      broadcast 222.222.222.222
      netmask   255.255.255.224
      gateway   222.333.222.333
    
    # device: eth0:0
    iface eth0:0 inet static
      address   55.55.55.192
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:1
      address   55.55.55.193
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:2
      address   55.55.55.194
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:3
      address   55.55.55.195
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:4
      address   55.55.55.196
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:5
      address   55.55.55.197
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # device: eth0:6
      address   55.55.55.198
      broadcast 55.55.55.199
      netmask   255.255.255.248
      gateway   222.333.222.333
      
    # default route to access subnet
    up route add -net XX.XXX.XX.XXX netmask 255.255.255.224 gw XXX.XXX.XXX.XXX eth0
    
    When I try to restart the network, here is what I get:
    Code:
    # /etc/init.d/networking restart
    Reconfiguring network interfaces.../etc/network/interfaces:22: duplicate option
    ifdown: couldn't read interfaces file "/etc/network/interfaces"
    /etc/network/interfaces:22: duplicate option
    ifup: couldn't read interfaces file "/etc/network/interfaces"
    failed.
    Any idea what I'm doing wrong?
     
  5. id10t

    id10t Member

    Its all those gateways... you only need 1 default gateway... just take 'em off the extra IPs

     
  6. Been Told

    Been Told Member

    Thanks!
    I'm afraid it didn't help though. :(
    Code:
    server1:~# /etc/init.d/networking restart
    Reconfiguring network interfaces.../etc/network/interfaces:22: duplicate option
    ifdown: couldn't read interfaces file "/etc/network/interfaces"
    /etc/network/interfaces:22: duplicate option
    ifup: couldn't read interfaces file "/etc/network/interfaces"
    failed.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    You need an
    Code:
    iface eth0:x inet static
    line for each virtual network card, not just for the first one.
     
  8. Been Told

    Been Told Member

    Awesome thanks! So now I should be able to use the IP addresses in ISPconfig right? I entered them in ISPconfig -> Management -> System Config -> Settings -> IP List
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Yes, that's right. :)
     

Share This Page