View Full Version : Need help adding additional IPs to my server and ISPconfig
Been Told
17th May 2009, 15:26
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. :o
falko
18th May 2009, 10:59
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.).
Been Told
18th May 2009, 13:52
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.
Been Told
18th May 2009, 18:36
OK I have a problem... Here's what I put inside my /etc/network/interfaces file:
# 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:
# /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?
id10t
18th May 2009, 20:15
Its all those gateways... you only need 1 default gateway... just take 'em off the extra IPs
OK I have a problem... Here's what I put inside my /etc/network/interfaces file:
# 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:
# /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?
Been Told
18th May 2009, 20:56
Thanks!
I'm afraid it didn't help though. :(
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.
falko
19th May 2009, 15:02
You need an
iface eth0:x inet static
line for each virtual network card, not just for the first one.
Been Told
19th May 2009, 18:50
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
falko
20th May 2009, 17:03
Yes, that's right. :)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.