Page 1 of 1
Give a VM access to local network of host, but not internet
Posted: 29. Sep 2015, 23:06
by nom
I've got a Windows 8.1 VM that I want to use to access a database that's on my local network (192.168.x.x). I don't, however, want to give the VM access to the internet. Currently, it has no network adapter. To access local networks, it needs to bridge the adapter, right? But how can I bridge the adapter without allowing the VM any outside internet access?
Re: Give a VM access to local network of host, but not inter
Posted: 30. Sep 2015, 01:37
by BillG
I can't think of any way you could do that with a VirtualBox setting.
The usual way to allow a machine access to its own subnet but not to any other networks is to remove its default gateway address.
Re: Give a VM access to local network of host, but not inter
Posted: 1. Oct 2015, 15:20
by scottgus1
I have blocked internet to a bridged guest by using the Access Restrictions or Parent Controls in the network router to block internet access to the guest's IP address (guest needs a static IP for this).
Re: Give a VM access to local network of host, but not inter
Posted: 2. Oct 2015, 01:07
by BillG
If you are using manual config to give it a static IP you might as well just leave the gateway address blank.
Re: Give a VM access to local network of host, but not inter
Posted: 2. Oct 2015, 13:45
by scottgus1
So no gateway for a computer renders the computer unable to get to the internet? I'll have to remember that! Sounds a lot easier than the Access restrictions stuff...
Re: Give a VM access to local network of host, but not inter
Posted: 3. Oct 2015, 02:41
by BillG
If it doesn't have a gateway address it can't get out of its own subnet.