Attention! In order to get L2TP/IPSec working correctly with Windows, it is necessary to make changes to the registry (add a parameter). This problem is listed on the official Microsoft website https://support.microsoft.com/en-us/kb/926179. This procedure will be described below in (1) of this manual. If you are not ready to make changes to the Windows registry, then you can set up VPN with PPTP protocol (see PPTP settings here), which not required the modification of the registry.
1. Making changes to the Windows registry (Administrative rights):
1) Run regedit with administrative privileges and locate the section HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent
2) Create DWORD (32 bit) parameter AssumeUDPEncapsulationContextOnSendRule and set value 2 for it.
3). Restart Windows!!!
2. Click "Open Network and Sharing Center" from Network-icon context menu:
3. Select "Set up a new connection or network":
4. Select "Connect to a workplace" and click "Next":
5. Select "Use my Internet connection (VPN)":
6. In the field "Internet address" enter given ip-address of your VPN server and click "Create":
7. At this stage, a newly created VPN-connection is ready, but network adapter is not yet configured. Do not connect now, please click "Change adapter settings" in "Network and Sharing Center":
8. In context menu of a newly created VPN Connection please click "Properties":
9. Once again check the given ip-address of your VPN-server on "General" tab:
10. Please go to "Security" tab:
1) In listbox "Type of VPN" select "Layer 2 Tunneling Protocol with IPsec (L2TP/IPSec)".
2) Click the button "Advanced settings".
3) In the window "Advanced Properties" that opens, enter given IPSec pre-shared key to field "Key".
4) Close "Advanced Properties" by clicking "OK".
5) In listbox "Data encryption" select "Require encryption (disconnect if server declines)".
6) Check "Microsoft CHAP version 2 (MS-CHAP v2)" checkbox.
7) Close "VPN Connection Properties" by clicking "OK":
11.Now everything is ready. You can connect to VPN server. To get connected please click "Connect/Disconnect" menu item in context menu of a newly created VPN Connection:
12. In the panel "Networks" that opens please click the button "Connect" of the newly created VPN Connection:
13. Enter given VPN user name (e-mail address) and VPN password and click "OK":
From now, after VPN Connection has already been created, it can be turned on/off from "Networks" panel that can be displayed by clicking on"Network" icon: