Windows 10 does not connect to IPsec/L2TP server - connection error
![Windows 10 does not connect to IPsec/L2TP server - connection error](/content/images/size/w2000/2020/03/Screenshot-at-Mar-17-15-17-50-2.png)
Fresh installation of Windows 10, IPsec/L2TP VPN server running on QNAP or Mikrotik and problem with VPN IPsec/L2TP connection... But the problem is not QNAP or Mikrotik but Windows 10 itself.
![](https://www.8px.pl/content/images/2020/03/Screenshot-at-Mar-17-16-20-58.png)
IOS or MacOS connect without any problems - systems proven in person.
Of course, there is a quick fix for this, here we have to go to the registry editor - regdit - and add the appropriate entry:
![](https://www.8px.pl/content/images/2020/03/Screenshot-at-Mar-17-15-17-50-2-1.png)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent
This is to be DWORD32 called AssumeUDPEncapsulationContextOnSendRule and value 2.
After adding the entry we have to reboot Windows.
![](https://www.8px.pl/content/images/2020/03/Screenshot-at-Mar-17-15-15-59.png)