Page 1 of 1
NAT connection is independent on a per guest basis.
Posted: 19. May 2011, 12:50
by gilesc
Hi,
I am running VirtualBox 4.0.8 on Windows 7 x64.
I have multiple guests and would like them all to be able to access the Network connection on my host computer and would also like them to be able to see each other on the NAT subnet.
It appears however, that each host gets the same IP address 10.0.2.15 from the Host system's DHCP server and none of them can see each other.
Is there an easy way to achieve this?
As a workaround I'm planning to have a dual-homed virtual firewall with either a bridged or NAT connection and another interface card with a Host-Only connection. All other guests will have the Host-Only connection and use this virtual firewall as their gateway.
Is there an easier way that doesn't involve the virtual firewall?
Thanks
Giles
Re: NAT connection is independent on a per guest basis.
Posted: 19. May 2011, 17:24
by Leak
Errr... that's exactly the use case the "Internal network" mode for the emulated NICs is for - just add another NIC to the VMs then use the same network name for all the guest VMs that should be able to see each other.
np: Gescom - Slow Acid (ISS:SA)
Re: NAT connection is independent on a per guest basis.
Posted: 19. May 2011, 19:05
by gilesc
Yes, but am I right in thinking that if I use Host Only then none of my hosts have access to the network connection that my host system has?
With VMware products I recall the NAT interface provided the host system as the defualt gateway, allowing the virtual systems to see each other and the network the host was connected to.
With VirtualBox it appears that the NAT interface gives each host NAT access to the network the host has, but doesn't allow different virtual hosts to see each other.
I can't see an easy way of achieving this on VirtualBox. Hence my question.
Re: NAT connection is independent on a per guest basis.
Posted: 19. May 2011, 23:30
by Leak
gilesc wrote:With VirtualBox it appears that the NAT interface gives each host NAT access to the network the host has, but doesn't allow different virtual hosts to see each other.
True.
But it also gives you up to 4 (or 8, using the command line) network cards per VM - so you can use one for NAT to access the internet, and another one for an internal network (which is a different option than "Host-only") to connect the VMs to each other. Or you could, of course, run a single VM with NAT and internal network and use it as a router for the other VMs with just internal networking.
np: Pantha Du Prince - Welt Am Draht (Black Noise)
Re: NAT connection is independent on a per guest basis.
Posted: 20. May 2011, 06:40
by gilesc
Leak wrote:Or you could, of course, run a single VM with NAT and internal network and use it as a router for the other VMs with just internal networking.
Which is what I've gone ahead and done. I'm using Smoothwall, and it appears to work quite well, don't know if anyone else is doing something similar, and whether they are using any particular pre-built Vbox as a router / firewall?
I'd be interested to hear what anyone else is using for this.
I didn't think of giving every VBox two interfaces, one NAT and the other host-only, but I guess that would probably work as well - It wouldn't however, represent much of a real-world environment, which is what I'm trying to represent in my labs.
Re: NAT connection is independent on a per guest basis.
Posted: 20. May 2011, 07:05
by BillG
I run my vms on an internal network and run one vm as a firewall/router. The router has on NIC (public) bridged to the phyisical network the other (private) as the default gateway for the internal network (just as you would run a physical network behind a firewall/router).
Whether you use NAT or not is your decision (just as it is with a physical network). NAT is easiest because you do not need to modify the routing on the physical LAN.
Re: NAT connection is independent on a per guest basis.
Posted: 20. May 2011, 22:02
by ChipMcK