Windows 10 VPN L2TP

Windows 10 VPN L2TP nightmare (Solved)

This is not a data recovery-related post, but we are sure it will help others.
After the recent Windows 10 Creators update, my VPN L2TP connection stopped working.
If I were to connect with PPTP, it would work fine, but we don’t want to use that protocol due to its weaker security vs L2TP.
When trying to connect, this is the error message I was getting:
———
The network connection between your computer and the VPN server could not be established because the remote server is not responding. This could be because one of the network devices (e.g, firewalls, NAT, routers, etc) between your computer and the remote server is not configured to allow VPN connections. Please contact your Administrator or your service provider to determine which device may be causing the problem.
———
Windows 10 L2TP VPN Connection Error Message
After reinstalling the VPN server on the Synology NAS (that’s where I was connecting before), removing and adding the VPN to Windows 10… Changing the IP addresses, researching the tech forums… I thought that’s it… I need to reinstall Windows 10 on my laptop.
My two other systems running Windows 10 and Windows 7 worked fine; however, one of them didn’t want to cooperate. Since the best/easiest way to fix any windows problem is to format your drive and reinstall a fresh copy of Windows, I was tempted to take that route.
I finished a full backup of my laptop and was about to start the above formatting/re-installation when I thought…let me try this last thing…maybe that would do the trick…
– I opened the Device Manager and located the Network Adapters, WAN Miniport (L2TP). I quickly re-installed it, rebooted the laptop, and Voila!… I got the L2TP to work! I thought, well, maybe just a glitch.
Reinstalling L2TP Protocol
When I decided to connect again the next day I was greeted with that same nasty error message again. This time uninstalling the L2TP protocol didn’t work, so I was looking for a better, permanent solution. At that point, I was determined that it’s something to do with the registry, so formatting the drive and reinstalling wasn’t an option anymore, as I took this issue as a challenge.
Hours of research later, I found this registry trick, which worked like a charm.
It’s a simple manipulation that would do the trick:
1 – Right-click on the bottom left Windows Start icon
2 – Select Run
3 – Type “regedit” (without quotations) and press Enter
4 – Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent
5 – Right-click and select New > DWORD (32-bit value)
6 – Name it AssumeUDPEncapsulationContextOnSendRule
7 – Set the value to 2
8 – Reboot your computer.
9 – That’s it. You are done.

After several reboot attempts, the VPN is working like before, without any problems. Share the article if you think it can help others.