Virtual machine and ExpressVPN

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Shawerma
Posts: 5
Joined: 16. Oct 2023, 00:32

Virtual machine and ExpressVPN

Post by Shawerma »

TLDR: I want to use ExpressVPN network only on my Virtual Box without using my main network, in this case if ExpressVPN went down for any reason the VM will not use my main network

I have been trying to figure out this problem for a week now, hopefully someone tried this before

Here is what I do not want to happen:

My Pc ===> [NAT network] which include my home internet and expressVPN if I used split tunneling, if my expressVPN went offline, it will connect to my home interent which is not what I want ===> Virtual box



Here is what I am trying to do:

My pc ===> ExpressVPN network, if expressVPN network went offline the virtual machine network will go offline as well and it will not use my home network ===> virtual box



I want to use ExpressVPN for my Virtual Machine separated from my main network, my virtual box have the option to select "expressVPN adapter" on bridged adapter network settings , But from what I heard to do that I must have a router that have expressVPN installed on it and connect it to my PC with a cable or wifi to be able to do that




Some people recommended to do the following:

"Upon checking, what you can do is set up the adapter of your virtual machine to use the TAP or TUN adapter. This way your virtual machine has internet only if connected to ExpressVPN, It should be done on your virtual machine. However, we don't have the steps on our end. It's best if you can contact your virtual machine provider or check online for steps on how to do that."

I am not sure if this solution is right or how to do it
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine and ExpressVPN

Post by mpack »

Using standard VirtualBox features you can avoid using the host PC network stack, but you can't avoid your LAN.

The only way to bypass your LAN would need a spare ethernet card on the host, not connected to that LAN. Or a USB WiFi dongle owned by the VM.

The VPN part is no problem. You just install the VPN client in the VM.
Shawerma
Posts: 5
Joined: 16. Oct 2023, 00:32

Re: Virtual machine and ExpressVPN

Post by Shawerma »

The VPN part is the my biggest problem, even if I downloaded and used the expressVPN inside the VM, if the VPN network got disconnected for some reason it will connect to my main network which something I do not want to happen

I want if the VPN goes off, the whole internet access goes off

can you help?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine and ExpressVPN

Post by scottgus1 »

Shawerma wrote: 16. Oct 2023, 19:51 I want if the VPN goes off, the whole internet access goes off
Virtualbox doesn't have a way to enforce this.

You'd have to figure out how to get your VM's OS to only work with the network connection made by the VPN and nothing else. This sort of thing is also attemptable in a real PC too, and isn't restricted to VMs in general or Virtualbox in particular. How to do this isn't on topic in this forum. Try the VPN or the OS's forums and support channels?
Shawerma
Posts: 5
Joined: 16. Oct 2023, 00:32

Re: Virtual machine and ExpressVPN

Post by Shawerma »

I have contacted a lot of people, and all of them I should ask here on this forums, I am really confused on what to do sorry
delicious
Posts: 1
Joined: 29. Jan 2024, 09:23

Re: Virtual machine and ExpressVPN

Post by delicious »

express vpn has an option to disable all internet traffic if it goes down unexpectedly
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine and ExpressVPN

Post by scottgus1 »

Shawerma wrote: 16. Oct 2023, 22:26 I have contacted a lot of people, and all of them I should ask here on this forums
OK, but now you're asking folks in the know about Virtualbox, and:
scottgus1 wrote: 16. Oct 2023, 19:56 Virtualbox doesn't have a way to enforce this.
So, you should do as new user "Delicious" suggests, and as I said above:
scottgus1 wrote: 16. Oct 2023, 19:56 You'd have to figure out how to get your VM's OS to only work with the network connection made by the VPN and nothing else. This sort of thing is also attemptable in a real PC too, and isn't restricted to VMs in general or Virtualbox in particular. How to do this isn't on topic in this forum. Try the VPN or the OS's forums and support channels?
Post Reply