Oracle Virtual Box through VPN

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
Teremok
Level 1
Level 1
Posts: 3
Joined: Sun Apr 01, 2018 10:13 am

Oracle Virtual Box through VPN

Post by Teremok » Mon Apr 02, 2018 8:59 am

Hi!
I have host OS Linux Mint 18.3. Also i have an Oracle Virtual Box with some guest OS. Is it really to connect Virtual Machine to internet through VPN, and other traffic in host OS leave unencrypted. I am interested precisely in those variant: VPN + VM, but not VM + VPN. Please, help me with this question!

User avatar
xenopeek
Level 24
Level 24
Posts: 24063
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Oracle Virtual Box through VPN

Post by xenopeek » Mon Apr 02, 2018 9:40 am

What do you mean with: "VPN + VM, but not VM + VPN"

You can just setup a VPN in your guest OS. I think the above means you don't find that good enough. Why not?

Setting up the VPN on the host OS and only using it for one specific VM is a lot more work. Perhaps this: viewtopic.php?t=175765. Mind also how you've set the network configuration in VirtualBox for your VM. Some modes may not work or you may have to do more than in the linked topic. See VirtualBox networking: https://www.virtualbox.org/manual/ch06.html
Image

Teremok
Level 1
Level 1
Posts: 3
Joined: Sun Apr 01, 2018 10:13 am

Re: Oracle Virtual Box through VPN

Post by Teremok » Tue Apr 03, 2018 11:29 am

Thank you very much! I thought it will be much more simple.
Ok, i agree that virtual box with VPN will be better. But VPN sometimes disconnected and my ip can be showed or provider can saw on what sites am I. Is it really to let all traffic only through VPN and don't let traffic not through the VPN? I mean if VPN breaks - not let traffic to go through common internet.

User avatar
xenopeek
Level 24
Level 24
Posts: 24063
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Oracle Virtual Box through VPN

Post by xenopeek » Tue Apr 03, 2018 11:43 am

If you Google "linux drop network when vpn dropped" you'll find plenty of things others have done for this. Two common approaches are to either configure your firewall (on the guest OS) so that it only allows traffic to the VPN and blocks all outgoing traffic to other networks, or to set up a network "kill switch" so when the VPN connection drops your network interface is brought down as well.
Image

Post Reply

Return to “Other networking topics”