1

I have an office VPN that I need to connect to which uses L2TP/IPsec with a pre-shared key. At home (on my home network) I have two computers: a MacBook Pro, and a Windows 10 machine. I am able to successfully connect to the VPN on the Mac with no issue whatsoever. However the Windows 10 computer, on the same network with the same credentials, cannot connect. I consistently receive this message:

The connection was terminated by the remote computer before it could be completed.

The VPN server is running in Amazon EC2 using this VPN server from Foxpass. I have already taken two steps that I found in other Server Fault answers / guides online to try and remedy the problem. The first was to add a DWORD registry entry with the value of "2" at this path:

HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent\AssumeUDPEncapsulationContextOnSendRule

And the second was to select the new VPN connection entry, right-click, Properties, Security Tab, and change the Data encryption dropdown to "Require encryption."

Neither of these worked. I am baffled why my Mac is able to connect from my network while my Windows machine is not. The Mac setup looks like this (there aren't any "special" settings - this is pretty much the default way of how you set up a VPN on Mac):

mac1 mac2

And the Windows setup looks like this - again this is really just entering in stock settings:

enter image description here

Clearly it is not a fault of the VPN server as I can successfully connect from the Mac. What do I need to do to get it working on Windows?

soapergem
  • 719
  • 4
  • 13
  • 29
  • "What do I need to do to get it working on Windows?" - The only reasonable answer that can be given is that you need to match the settings on your VPN profile to that which is required by the VPN provider. We can't possibly answer what those settings are for you. At the very least you could provide screenshots of your existing settings. – Appleoddity Mar 15 '18 at 05:49
  • I have added screenshots as requested. – soapergem Mar 15 '18 at 14:27
  • Ok. I’m not opposed to using the modern windows 10 GUI, but it does leave a lot to be desired. You should find the VPN connection in the classic control panel under network connections. Right click it and check the properties. There are a lot more details there. There are a lot more settings to configure such as encryption, hash and lifetime settings. You should look under advanced on the MAC also to compare. More screenshots about that would help. But what you show so far looks ok. – Appleoddity Mar 15 '18 at 18:03
  • Usually the problem with Windows and roadwarrior VPN clients is that you need to run them as Administrator as they modify the network settings and normal users are not allowed to do it. Also, you might be hitting some issues with the firewall if you have it enabled. Did you check those two settings? – Leo Gallego May 21 '18 at 23:14

2 Answers2

1

Windows defaults the L2TP connection to use CHAP, but you need to go into the adapter settings and switch it to PAP. That, along with the AssumeUDPEncapsulationContextOnSendRule, should get this working.

ArenS
  • 36
  • 3
  • That did it! The combination of the registry edit (plus a restart) and switching the protocol to "Unencrypted password (PAP)" under adapter options did it. Thank you! – soapergem Jun 01 '18 at 05:17
0

Make sure if any certificate is required to be installed for that service to work in Windows. Windows is sensitive about matching certificates and all.

In addition, I suggest you try with less restrictive encryption modes, e.g. "Optional" and troubleshoot from there.

MTG
  • 193
  • 6