How to create a VPN between a Host and VMWare VMs

networkingvmware-workstationvpnwindows 7windows-server-2003

I have a set of machines as follows

  1. My home laptop running Win7 Ultimate with internet connection.
  2. A vmware workstation vm running Windows Server 2003 Standard edition server in my laptop w/o internet connectivity
  3. Some of my peers' machines connected to internet

I want to create a VPN with these machines, provided the VM will not have any direct internet connection and my peers should able to connect to the SVN server application running on this Win2003 server VM.

Can anybody please suggest me how to setup this network, what software I need to install in both physical machine and vm, what kind of network connectivity should be there between vmware guest and host machine?

EDIT: I deliberately don't want to connect the VM with internet. The host will work more of a gateway of the VPN connection for the VM.

EDIT: Desired Topology:

enter image description here

Here Win2003 server runs some webapps, which I want to be accessible only by Win7, Peer1 and Peer2 and no internet traffic to and from Win2003 server.

Best Answer

At some point, if you want to run a VPN over the Internet, there needs to be some kind of machine with an internet connection connected to the network.

It is possible to run a VPN server on your laptop's host OS directly, although I wouldn't recommend it for security reasons. Instead, consider installing a third VM just to act as a VPN server and router/firewall. Personally, I'd use something like pfSense for this purpose. (Make sure you get the 2.0 version, rather than the "VM Image" which last time I checked was still version 1.2 - 2.0 added better functionality for filtering VPN traffic among other things).

Your setup would look something like:

Network diagram

The pfSense VM would act as a firewall/router connected to the Internet and providing an OpenVPN server. The firewall rules would be configured so that the Windows 2003 Server VM has no access to make connections out onto the internet, and that incoming connections would also be blocked.

You would need to disable the IP stack of the host-only network interface used between the pfSense VM and the Windows 2003 Server VM on the Windows 7 Host machine to acheive this topology. Or perhaps there's some kind of functionality for VM-to-VM only networking in VMware Workstation that I'm overlooking.