0

I want to:

  • Use my local pc (debian) for accessing regular LAN and internet (home network router->WAN)
  • Use a VirtualBox pc (windows) that can ONLY communicate trough a VPN connection on the local pc.

So the VPN network adaptor on the local pc should not be used on that local pc. It should be only used by VirtualBox as it's main and only network adaptor.

I know there is a solution by allowing VirtualBox to the local pc's internet by adding a NAT adaptor, and then install a VPN client inside the guest OS. But this is NOT what I want. I want that the guest OS is completely 'untrusted' and that local internet connections by the guest OS are made impossible by design.

I guess I need something like installing a VPN client on the local PC (debian) but without affecting the route. So basically, only adding a new network adaptor (tun0) that connects to the VPN server. Next, I probably need to add a bridged adaptor to VirtualBox connected to the VPN adaptor (tun0). But I'm not sure if this will give issues as virtualbox will have a different MAC address as tun0.

Any ideas on how to do this right? Thanks in advance!

3
  • So you already have a tun0 interface available with a working VPN tunnel? is it a tun or a tap interface (ip -d link show type tun | grep -o 'tun type t..' )? Likewise you're already able to create a host-only interface called vboxnet0 with default settings on VirtualBox?
    – A.B
    Commented Dec 22, 2020 at 16:48
  • I can have a working tun0 interface with OpenVPN, but then all my local traffic is routed over VPN also which I don't want. Also, in my understanding, a host-only interface is only a virtual interface inside VirtualBox to interconnect several VM's. I cannot select tun0 as host-only adapter but only as bridge adapter
    – Bigjim
    Commented Dec 22, 2020 at 17:17
  • Ok, then the question would ask for everything: reconfigure the VPN to not change routes, in addition to configuring VirtualBox, and then actually address the problem: (policy) routing. Too much for me. Btw, I didn't ask to set tun0 as host-only adapter, I asked about creating a new vboxnet0 host-only adapter. As I don't use VirtualBox, that's the limit of my knowledge there.
    – A.B
    Commented Dec 22, 2020 at 17:22

0

You must log in to answer this question.

Browse other questions tagged .