VPN for VM only

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
mdespland
Posts: 1
Joined: 26. Jun 2016, 11:38

VPN for VM only

Post by mdespland »

Hello

For security reason, I want to have a VM on my professional computer for development purpose. My computer is on our entreprise network that is full of network constraints.
The idea is to put the VM on an other network through a VPN

I know how to do that configuring the VPN on the host or the VM, but that way the VM or the host could be able to access both networks ... and i don't want that (because our security team will say that is a security issue)

What could be great is to have a special network adapter for the VM like NAT that is in fact a VPN client. So the VPN is created on Virtual Box side and the host have no access to it. And the VM has no other choice that using the VPN.
thisGuy
Posts: 2
Joined: 18. Jul 2016, 23:18

Re: VPN for VM only

Post by thisGuy »

Agreed. Local network isolation would be very useful.
MetaFurionX
Posts: 2
Joined: 8. Jan 2017, 04:56

Re: VPN for VM only

Post by MetaFurionX »

I'm really interested in this too.
Any way to achieve this with the current VirtualBox 5.1 yet, anyone?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VPN for VM only

Post by socratis »

@everyone
Start by reading Ch. 6.2 Introduction to networking modes in the User Manual. If you find that none of the existing modes suits your needs, either for network isolation (thisGuy) which would be the HostOnly or the Internal, or you cannot enforce a VM-only network access through the bindings (mdespland), please describe in full and exact detail your network setup and most important what you want to achieve, and a solution will be found. It hasn't failed so far...

@MetaFurionX
There are two separate suggestions, both solvable. "Me too" doesn't exactly say which one you're interested in...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
MetaFurionX
Posts: 2
Joined: 8. Jan 2017, 04:56

Re: VPN for VM only

Post by MetaFurionX »

Sorry if I misinterpreted something.
My goal is either to have a VM in a different network than the host or just have the network working for the VM only, because either way solves my issue.
Thank you for the link.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VPN for VM only

Post by scottgus1 »

To get the guest (VM) to communicate with the outside world it must have access to some form of physical network card. The easiest and perhaps only way to have the guest be on one network while the host PC OS is on another network is by adding a network card or USB adapter to the host PC.

If you add a new card to the host PC you can turn off the Virtualbox bindings on the network card the host OS will use, and turn off the non-Virtualbox bindings on the card the guest(s) will use. On a Windows host these bindings are the list of checkboxed items in the network card's Properties window.

If you add a USB network adapter you can use Virtualbox's USB filters to funnel the USB network adapter directly into the guest so the host doesn't even see it let alone be able to use it. You will need to install the USB adapter's drivers in the guest for this method.

After you do one of these two procedures, you can VPN to your heart's content in the guest and the host would be completely oblivious.

If you decide to have the host offline but only the guest networked, you do not need a second network card or adapter. Turn off all the non-Virtualbox bindings on the host's network card. The host will not have network but the guest(s) will.
Post Reply