Synology L2TP/IPSec VPN

In the last few releases, Synology has added L2TP/IPSec as an option for a VPN.  I’ve never been able to get it to work on a Windows client until today.

Ports Required:

  • IPSec – UPD 500
  • IPSec NAT Traversal – UDP 4500
  • L2TP – UDP 1701

Fix on Windows clients – http://support.microsoft.com/kb/926179

  • For Win7 and Win8 Machines
    • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesPolicyAgent
    • New DWORD (32-bit) – AssumeUDPEncapsulationContextOnSendRule
    • Set the Value Data to 2

Update:

Using OpenVPN with port 443, for easier access: http://forum.synology.com/enu/viewtopic.php?t=45545#p215354

Comments

15 responses to “Synology L2TP/IPSec VPN”

  1. Ranil Seneviratne Avatar
    Ranil Seneviratne

    Very helpful post and it effectively resolved my issue of accessing my Synology VPN from my win 7 laptop. thank you.

  2. Rolando Avatar

    I struggle with this issue the whole afternoon. Your trick did it!
    Thanks!

  3. Chuck Avatar
    Chuck

    Now if there was only a way to make this fix on a Windows 8.1 Update 1 Phone

  4. Tom Richards Avatar
    Tom Richards

    Thank you – this short and direct little post told me exactly what I needed to know.

  5. Louis Avatar
    Louis

    Worked after a reboot after having added the key.
    Thank you!

  6. Ilke Avatar
    Ilke

    Found that very helpful as well.This also worked on a Win8.1 non-pro after restart. Thanks for sharing !

  7. Cameron Avatar
    Cameron

    Awesome, it worked for me on Synology DS415+, VPN connects very well but I am still having problem with seeing the shared folder in DS or even seeing whole Synology while VPN connected to the LAN however according to DSM my windows 7 pc can get IP from different Subnet. Any idea to resolve this issue?Thanks

  8. Henk Avatar
    Henk

    This also works on Win10 (evaluation install)

  9. Steven Avatar
    Steven

    I add the registry key, but I cannot connect to the VPN.

    With Apple, Android System it works fine.

    But no change to connect via Windows 10.

    Any idea?

    1. Mars Avatar
      Mars

      There are two services that need to be running on a windows system:
      IKE and AuthIP IPsec Keying Modules & IPsec Policy Agent
      Change them both to automatic and start them and you should be right!

  10. jm Avatar
    jm

    Thanks, thanks, thanks,
    Lot of time searching, trackking, debugging and now with a simple “2” value in the registry.

  11. Kyle Avatar
    Kyle

    Thank youuuuuuu – “2” value in the reg fixed mine

  12. Karsten Avatar
    Karsten

    Thanks. Now LT2P working between my Surface and Synology

  13. Sung Avatar
    Sung

    Wow. It’s awesome. I finally succeeded to connect to the VPN server from my Surface Pro(windows 10). Reboot is required after adding the variable to the registry. Thank you so much aaron.

    1. aaron Avatar
      aaron

      You’re welcome!