How to create a VPN between a Host and VMWare VMs?

7,062

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.

Share:
7,062

Related videos on Youtube

Anindya Chatterjee
Author by

Anindya Chatterjee

I supposed to know something about Computer and its science, but the reality is I know nothing !!!

Updated on September 18, 2022

Comments

  • Anindya Chatterjee
    Anindya Chatterjee over 1 year

    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.

  • Anindya Chatterjee
    Anindya Chatterjee over 12 years
    I don't want to put the VM in internet.. please see my edited section in op. Then is it possible to set up a VPN like that?
  • Anindya Chatterjee
    Anindya Chatterjee over 12 years
    In this topology can I create a VPN between Win7 host, Win2003 VM and some selected machines connected to internet and make sure that there will be no internet connection to Win2003 server? And Win7 host and that selected machines can access web apps running on Win2003?
  • Per von Zweigbergk
    Per von Zweigbergk over 12 years
    This depends on how strict your requirement of the Windows 2003 Server not being connected to the Internet is. If it is sufficient that a firewall independent of the Windows 2003 server itself blocks all incoming and outgoing traffic to that server, then yes, it is possible. It's difficult to give a proper answer without knowing more about your environment and your security requirements. For example, if you require outgoing internet access to be blocked as well as incoming...
  • Anindya Chatterjee
    Anindya Chatterjee over 12 years
    my requirement is all internet traffic will be blocked in Win2003 server except the traffic from all the machines in the VPN and the I want to create the VPN using software and vmware host to guest networking only.
  • Anindya Chatterjee
    Anindya Chatterjee over 12 years
    thanks for the help. I edited the post to add more info, hope this will help.