Have host and guest be two separate network connections.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Murf
Posts: 1
Joined: 24. Sep 2015, 18:46

Have host and guest be two separate network connections.

Post by Murf »

I have tried searching for this particular problem/question but was unable to locate anything. Apologies if my Google-Fu is not up to snuff.

Currently, I use my home pc(hard wired, win 7 64 bit)) to connect to my work vpn and then Remote Desktop to my work computer.
I would like to have (if it is possible), my VM(windows 7 64bit) connect to my work vpn and remote desktop to work computer from there. While still allowing my home pc (host) to have access to the internet but not be on the vpn.
Not sure how to set this all up to work properly. I do have a wireless adapter I can use along with my hard wired connection if that helps any.

TIA
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Have host and guest be two separate network connections.

Post by BillG »

Yes, you can dedicate one NIC to the host and one to the vm. You do that from the network settings in the host.

On the NIC for the vm, clear all check boxes except the VirtualBox NDIS Bridged Networking Driver. Only the vm can then use that NIC.

On the NIC for the host clear just the bridged networking driver so that the vm cannot use it.

You may have a problem with this if you are using VB 5.0.4, but it is fixed in the next build. This problem is discussed in this forum.
Bill
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Have host and guest be two separate network connections.

Post by Martin »

If you just need the VPN connection inside the VM you don't even need a seperate connection.
The VM will just use the existing internet connection to establish the VPN which doesn't change anything for the host.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Have host and guest be two separate network connections.

Post by BillG »

That sometimes works, but I would not offer it as an unconditional method. I have seen the VPN effectively disable the host by making itself the default gateway for the interface.
Bill
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Have host and guest be two separate network connections.

Post by Martin »

BillG wrote:I have seen the VPN effectively disable the host by making itself the default gateway for the interface.
If the VPN client only exists/runs inside the guest it can only be the default gateway for the guest OS. It cannot affect the networking of the host.
Post Reply