Set up an L2TP VPN Server on Windows Server 2012

Set up an L2TP VPN Server on Windows Server 2012

Creating a VPN Connection on a Windows machine

Creating a VPN Connection on a Windows machine

Before proceeding with setting up the integrated client in Windows, you must make a change to the registry if you are behind a NAT-T (like in this example). Click HERE to visit the article where I describe what to do (restart required). You can still proceed with setting up the connection but the above will have to be done in order to have it to work!

After all of the above, it’s time to configure a remote machine to connect to the VPN server. Open Network and Sharing Center and click on Set up a new connection or network.

set-up-a-new-connection-or-network

  1. Select Connect to a workplace and click Next.
    • connect-to-a-workplace
  2. Select No, create a new connection and click Next.
  3. Click Use my Internet connection (VPN).
    • use-my-internet-connection-vpn
  4. Type the public IP address where the VPN server will respond from. Also, give it a name and check if you want to remember the credentials and also allow other people to use this connection.
    • vpn-client-setup-public-ip
  5. If you are configuring it with certain versions of Windows, also check the checkbox where it states not to attempt the connection as it won’t work anyway.
  6. Once the new connection is saved, click Change adapter settings in order to edit its settings.
    • change-adapter-settings
  7. Right click on the newly created connection and go to the Security tab. Select Layer 2 Tunneling Protocol with IPsec (L2TP/IPsec) as type of VPN, then click Advanced settings and select Use preshared key for authentication and type the key specified in the VPN server (MyKEY in the example) – Click Ok to close the Advanced Properites. Now, in theory, once connecting for the first time, Windows will automatically detect the other options to select but in this case, I’ll specify also the Authentication to Microsoft: Secured password (EAP-MSCHAP v2) (encryption enabled). Look at the screenshots below.
    • my-vpn-security-l2tp
    • my-vpn-security-l2tp-preshared-key
  8. Finally, double click on MyVPN. That will open up a new window where you can finally click Connect. In Windows XP/7 you are also prompt for username and password in the same screen, in Windows 10 instead you will be prompt after you clicked on connect (screenshot is Windows 10 based).
    • connect-to-my-vpn
    • myvpn-connected

You are done! Keep reading if you want to see where the logs are stored or change their location!

IT Droplets

IT Droplets