Can't connect to L2TP/IPsec VPN on windows but works fine on phone on same network

4

3

I have a remote VPN server running which I want to connect to. On my android phone it works fine on both mobile network and my home wifi network. However, on my windows machine I can't get it to work whatsoever. There is no useful error information other than the one below. In other words, it has something to do with the way Windows is trying to connect and I have no clue where to start debugging.

VPN connection error

My config looks like this

VPN config

I am using a pre-shared key which I have entered in the advanced settings. My firewall is off.

Ortix92

Posted 2016-01-02T21:53:03.907

Reputation: 791

try it: How to disable the automatic L2TP/IPsec policy in Windows 2000 Server https://support.microsoft.com/en-us/kb/310109

– Levi Pereira – 2016-01-21T16:36:56.147

Answers

3

I had the same issue. I found that creating this DWORD registry value and rebooting the client resolved this issue:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PolicyAgent]
"AssumeUDPEncapsulationContextOnSendRule"=dword:00000002

The registry change is mentioned in this KB article : http://support.microsoft.com/kb/926179

In case the KB article goes away, the possible values are as following:

  • 0 (default): A value of 0 (zero) configures Windows XP SP2 so that it cannot initiate IPsec-secured communications with responders that are located behind network address translators.
  • 1: A value of 1 configures Windows XP SP2 so that it can initiate IPsec-secured communications with responders that are located behind network address translators.
  • 2: A value of 2 configures Windows XP SP2 so that it can initiate IPsec-secured communications when both the initiators and the responders are behind network address translators.

Nathan Woroniuk

Posted 2016-01-02T21:53:03.907

Reputation: 41

You should quote and cite the entire source material. Specifically you need to expain the value should be 2 instead of 0 or 1. – Ramhound – 2017-01-19T19:13:17.097