I am using Ubuntu 12.04 as the platform for a VirtualMin installation which will host multiple websites for the same organization. For this, I need to bind multiple IP addresses in the same subnet to the server and I am having problems doing so.
I can bind the extra addresses either by using additional virtual nics (it is a vm) or by using virtual interfaces of one nic. In both cases the additional addresses ping just fine from any host on the local network, but only the primary nic can be pinged from any remote network. The behavior is just like what would happen if you configured a single nic with no gateway so I imagine this is an issue with the routing table, but I just can't produce a working config. Can anyone please take a look at my config and possibly point me in the right direction?
# The loopback network interface auto lo eth0 eth0:0 iface lo inet loopback # The primary network interface iface eth0 inet static address 10.192.3.104 netmask 255.255.224.0 gateway 10.192.0.1 broadcast 10.192.31.255 network 10.192.0.0 dns-nameservers 10.192.0.210 10.192.0.198 127.0.0.1 iface eth0:0 inet static address 10.192.30.52 netmask 255.255.224.0
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.192.0.1 0.0.0.0 UG 100 0 0 eth0 10.192.0.0 0.0.0.0 255.255.224.0 U 0 0 0 eth0