0

Is it possible to run a VPN inside a Linux VM that a host would connect to in order to protect traffic on an unsecured network? Or is the traffic that the VM VPN tunnel sends going to be unencrypted (since both the host and guest are on the same network)?

1 Answer 1

0

The fact that the machine that serves as the VPN server runs on the same network doesn't matter. When you set up a VPN server, you're creating a virtual interface with a network (for example, one might be using a private class C network as the internal network use, say 192.168.1.0/24, and at the same time use a private class A network, say 10.10.10.0/24, for VPN use).

So, say your VPN server has IPs 192.168.1.100 as the default interface, and you configure it to have IP 10.10.10.1 as the tun0 interface for VPN. If you send data to 192.168.1.100 it will be uncrypted, if you do to 10.10.10.1 as destination it will be crypted since it's the VPN interface.

2
  • But wouldn't the traffic sent from the VPN to the router be unencrypted? Aug 27, 2015 at 18:00
  • No, the traffic between the VPN server, located inside your LAN and the remote client would be sent encrypted always, because a VPN tunnel would be established. I think this graphic explains it quite well and is applicable to your situation: i-technet.sec.s-msft.com/dynimg/IC195069.gif
    – nKn
    Aug 27, 2015 at 18:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .