i have a debian box which is remotely accessed via ssh/ethernet ONLY. (i don't have physical access to the box).
the ip address (for the purposes this discussion) is 651.721.841.120.
i have 5 ip's total and want to configure it for the remaining 4 addresses 651.721.841.121 to .29.
i have edited the /etc/network/interfaces file accordingly.
please check it and make sure it will work and not lock me out after reboot.
thanks
........................................
auto eth0
iface eth0 inet static
address 651.721.841.120
netmask 255.255.255.0
gateway GW
auto eth0:0
iface eth0:0 inet static
address 651.721.841.120
netmask 255.255.255.0
gateway GW
auto eth0:1
iface eth0:1 inet static
address 651.721.841.121
netmask 255.255.255.0
gateway GW
auto eth0:2
iface eth0:2 inet static
address 651.721.841.122
netmask 255.255.255.0
gateway GW
auto eth0:3
iface eth0:3 inet static
address 651.721.841.123
netmask 255.255.255.0
gateway GW
---
Lacek: hugtux is right, so I have edited your post and replaced the IPs with fake ones. There is more than enough script kiddies out there, looking for targets...
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
adding 4 ip's to eth0
That way it probably won't work. Do this:
If you happen to screw up something, the first interface (eth0) will be always up and running, and processing will halt on the first error.
The pseudo interfaces will have the same settings for gateway, netmask, etc. as the physical one. You may give ifconfig some extra options if you want, but according your post, I don't think it will be necessary...
Code: Select all
iface eth0 inet static
address IP_ADDRESS
network NETWORK_ADDRESS
broadcast BROADCAST_ADDRESS
netmask NETMASK
gateway GW
up ifconfig eth0:0 IP2 up
up ifconfig eth0:1 IP3 up
up ifconfig eth0:2 IP4 up
# and so on...
The pseudo interfaces will have the same settings for gateway, netmask, etc. as the physical one. You may give ifconfig some extra options if you want, but according your post, I don't think it will be necessary...