I had issues connecting to my EdgeRouter X L2TP/IPSec VPN. My Android and iOS devices could connect fine but my Windows 10 laptop wouldn't. Thanks to chewychewbacca for these instructions:
- Log on to the Windows client computer as a user who is a member of the Administrators group.
- Click Start, point to All Programs, click Accessories, click Run, type regedit, and then click OK. If the User Account Control dialog box is displayed on the screen and prompts you to elevate your administrator token, click Continue.
- Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent
- On the Edit menu, point to New, and then click DWORD (32-bit) Value.
- Type AssumeUDPEncapsulationContextOnSendRule, and then press ENTER.
- Right-click AssumeUDPEncapsulationContextOnSendRule, and then click Modify.
- In the Value Data box, type ‘2’
- Click OK, and then exit Registry Editor.
- Restart the computer.
Reference UniFi Forum post