Windows 10 does not connect to IPsec/L2TP server - connection error

Windows 10 does not connect to IPsec/L2TP server - connection error

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.

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:

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.