Multi static IPs, 1 NIC, bridged to multi static guest IPs
Posted: 19. Nov 2009, 00:04
Here's the use case:
In short, Virtualbox 3.12 Multiple static IPs on one (Ubuntu 9.10) host NIC bridged to multiple static IPs in guests.
That is, I have a single physical box in a hosting environment with multiple public internet address available. I want to run several public IPs through the single physical NIC on the box (not hard in a non-bridged environment, simply use eth0:0, eth0:1, etc aliases..) but I want to 'pipe' one IP (all ports) to VM1, a second to VM2, etc. and of course I want the host machine to respond to ssh, vnc, etc on its own IP. I don't care that if guest A tries to ping guest B on the public internet, the traffic goes all the way back to the ISP..not an issue for me. However, that should work if both guests have 'piped' public IP addresses.
How to do this?
Does the syntax br0:0 work? If so, that is likely to be the solution.
eg., put something like this into /etc/interfaces
IP0 -> br0:0 -> eth0 -> vbox0 ;
IP1 -> br0:1 -> eth1 -> vbox1 etc..
or perhaps
IP0 -> br0:0 -> eth0:0 -> vbox0 ;
IP1 -> br0:1 -> eth0:1 -> vbox1
Note, the system presently works with one public static IP for the bridge, and two guests with static 10.1.10.x addresses, but of course those guests cannot be seen outside of the host. Those guests can ping each other, and the host can ping each of them on the 10.x address.
Now I want to add more public IPs to the host (again, if I can specify aliases for br0 like br0:0, br0:1, etc., I think that would do it) - and then map each of the virtual NICs to a single, permanent (not dynamically assigned) guest.
Help?
In short, Virtualbox 3.12 Multiple static IPs on one (Ubuntu 9.10) host NIC bridged to multiple static IPs in guests.
That is, I have a single physical box in a hosting environment with multiple public internet address available. I want to run several public IPs through the single physical NIC on the box (not hard in a non-bridged environment, simply use eth0:0, eth0:1, etc aliases..) but I want to 'pipe' one IP (all ports) to VM1, a second to VM2, etc. and of course I want the host machine to respond to ssh, vnc, etc on its own IP. I don't care that if guest A tries to ping guest B on the public internet, the traffic goes all the way back to the ISP..not an issue for me. However, that should work if both guests have 'piped' public IP addresses.
How to do this?
Does the syntax br0:0 work? If so, that is likely to be the solution.
eg., put something like this into /etc/interfaces
IP0 -> br0:0 -> eth0 -> vbox0 ;
IP1 -> br0:1 -> eth1 -> vbox1 etc..
or perhaps
IP0 -> br0:0 -> eth0:0 -> vbox0 ;
IP1 -> br0:1 -> eth0:1 -> vbox1
Note, the system presently works with one public static IP for the bridge, and two guests with static 10.1.10.x addresses, but of course those guests cannot be seen outside of the host. Those guests can ping each other, and the host can ping each of them on the 10.x address.
Now I want to add more public IPs to the host (again, if I can specify aliases for br0 like br0:0, br0:1, etc., I think that would do it) - and then map each of the virtual NICs to a single, permanent (not dynamically assigned) guest.
Help?