In order to get vpn to work consistently on a virtual machine, you need to do the following.

 

1.On your main host machine, install the MS Loopback adapter

 

Click the Start menu.

Search for “cmd".

Right-click on “cmd” and select “Run as Administrator”

Enter “hdwwiz.exe”

In the "Welcome to the Add Hardware Wizard", click Next.

Select "Install the hardware that I manually select from a list (Advanced)" and click Next.

Scroll down and select "Network adapters" and click Next.

Select under Manufacturer "Microsoft" and then under Network Adapter "Microsoft Loopback Adapter" and click Next.

 

2.On your main host machine, set your network connection to share with the loopback adapter

 

Open Network and Sharing Center

Click Change Adapter Settings on the left

Right click on the network adapter that you connect to the internet with and left click properties

Click the Sharing Tab

Check “Allow other network users to connect through this computer’s internet connection”

Select the loopback adapter connection and hit ok

 

3.Set your virtual machine to use the loopback adapter as its primary network connection

4.Reboot your virtual machine

5.Verify that your virtual machine can connect to the internet

6.Connect to the vpn