How to make Windows 10/11 connect to L2TP VPN (reg fix)

by Elena Constantinescu
Elena Constantinescu
Elena Constantinescu
VPN Expert & Privacy Advocate
Elena started writing professionally in 2010 and hasn't stopped exploring the tech world since. With a firm grasp of software reviewing and content editing, she is always trying... read more
Affiliate Disclosure
  • After creating a VPN connection using the L2TP protocol, you might receive error code 809 when trying to connect to the remote host due to NAT issues.
  • Windows 10 can connect to L2TP VPN using a reg hack. There are two ways to do it: through Registry Editor or Command Prompt. We listed the instructions for both.
  • Join our Windows 10 area to discover the best ways to use Microsoft's OS.
  • Bookmark our VPN Troubleshooting Hub to fix more VPN errors.
fix Windows 10 connection issues with L2TP VPN through the registry
If you’re trying to connect to a VPN on Windows 10 using the L2TP protocol but receive an error, you can fix it with an easy reg hack. All you need to do is open the Registry Editor (regedit) and do a bit of tinkering. If you received Windows error code 809, it says that The network connection between your computer and the VPN server could not be established because the remote server is not responding. This happens because the VPN server, client, or both are behind a NAT (Network Address Translation), such as a home router. But you can easily handle the NAT traversal issue with an easy registry fix.

Create a registry backup

create a registry backup
  1. Press Ctrl + R, type regedit, press Enter.
  2. If prompted by UAC (User Account Control), click Yes.
  3. Click inside the address bar and paste the following: ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesPolicyAgent
  4. Open the File menu and click Export.
  5. Save the registration file in a safe place.
Before making any kind of modifications to the system registry, it’s highly recommended to create a registry backup in Windows 10 so that you can effortlessly restore the original settings later if any errors occur. It’s definitely a quicker solution than having to use System Restore or worse, reinstalling Windows 10. Afterward, if you need to undo registry changes, just double-click the reg backup file.

How do I fix L2TP VPN connection issues in Windows 10?

Using the Registry Editor GUI

add AssumeUDPEncapsulationContextOnSendRule to regedit

  1. Launch Registry Editor with admin rights.
  2. Go to:
  3. Open the Edit menu > New submenu and click DWORD (32-bit) Value.
  4. Paste AssumeUDPEncapsulationContextOnSendRule as the value name.
  5. Right-click AssumeUDPEncapsulationContextOnSendRule and choose Modify.
  6. At Value data, type 2.
  7. Set Base to Hexadecimal.
  8. Click OK.
  9. Go to:
  10. Open the Edit menu > New submenu and click DWORD (32-bit) Value.
  11. Paste ProhibitIpSec as the value name.
  12. Right-click ProhibitIpSec and choose Modify.
  13. At Value data, type 0.
  14. Set Base to Hexadecimal.
  15. Click OK.
  16. Restart your PC.

If you can’t access the registry, check out our quick fixes. Or you can make Windows 10 connect to L2tT VPN using CMD instead of reg.

Using CMD

fix L2TP VPN connection issue using Command Prompt

  1. Launch Command Prompt as admin.
  2. Paste the following:
    REG ADD HKLMSYSTEMCurrentControlSetServicesPolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f
  3. Once the operation completes successfully, also paste:
    REG ADD HKLMSYSTEMCurrentControlSetServicesRasManParameters /v ProhibitIpSec /t REG_DWORD /d 0x0 /f
  4. Restart your PC.

Master the Command Prompt to get the best out of Windows 10 by joining our CMD Hub.

In conclusion, if Windows 10 can’t complete your L2TP VPN connection due to NAT issues, use the reg hack above to quickly fix your problem.

The first solution is suitable for casual users who prefer using the graphical interface. However, the second solution is faster for advanced users who are accustomed to the command-line interface.

The point is that both methods deliver the same results, and you should be able to connect to the VPN as soon as you reboot your PC. For instance, you can use a VPN to watch ITV Hub.

This article covers:Topics: