Connecting Host Adaptor via Guest VPN

This is for discussing general topics about how to use VirtualBox.
Post Reply
alsostl
Posts: 2
Joined: 3. Aug 2022, 18:54

Connecting Host Adaptor via Guest VPN

Post by alsostl »

Hi all, appreciate this is somewhat convoluted but I'm having difficulty understanding whether I can do what I want to do, and if so how.

My setup is this: Ubuntu VM running on Windows host. One network adapter, NAT.

The Windows host has a wired ethernet adapter and a WiFi interface. The WiFi interface is connected to my router, and the internet, and the ethernet interface is connected to an external IP video device. This device must access the internet via a VPN. The Ubuntu VM is configured to use this VPN connection, which it does.

The question is, how do I make all traffic from the external device go via the guest's VPN? I've tried adding a bridged adapter to the guest, bridged to the host ethernet adapter, but this doesn't work. Perhaps because there's no DHCP server? If anyone has any thoughts I'd be grateful to hear them.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting Host Adaptor via Guest VPN

Post by scottgus1 »

alsostl wrote:the ethernet interface is connected to an external IP video device. This device must access the internet via a VPN.
If you weren't using a VM, how does this device usually get set up? And where does the VPN normally run?
alsostl wrote:I've tried adding a bridged adapter to the guest, bridged to the host ethernet adapter, but this doesn't work. Perhaps because there's no DHCP server?
I think you're right, there. Bridged behaves like an unmanaged network switch virtually put into the physical network adapter, see Virtualbox Networks: In Pictures: Bridged Adapter. So Bridged will behave the same way a switch would. The VM has to get its IP address from somewhere on the switch's network. It can get the address from a DHCP server or it is set to a static IP address (a hint, there :D ).
alsostl
Posts: 2
Joined: 3. Aug 2022, 18:54

Re: Connecting Host Adaptor via Guest VPN

Post by alsostl »

Thanks for the reply. I think I'm on the right track with this now, the details being outside the scope of Virtualbox. That side of things appears correct.
Post Reply