Windows 11 VPN Connection - The L2TP connection attempt failed because the security layer

Sumit Kumar 0 Reputation points
2023-11-14T10:10:30.65+00:00

Hi,

I am trying to connect VPN

I got this error: Windows 11 VPN Connection Error: The L2TP connection attempt failed because the security layer encountered a processing error during inital negotiations with the remote computer.

Specifications are

Edition Windows 11 Home Single Language

Version 22H2

Tried possible solutions mentioned in https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#ikev1-troubleshooting
But not working. Any help would be appreciable.

Thank you!

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,382 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumit Kumar 0 Reputation points
    2023-11-15T06:30:02.6+00:00

    Issue is resolved by using correct IP address and followed steps mentioned in https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#windows-error-809

    After correct configuration was getting error 809

    Error 809: The network connection between your computer and the VPN server could not be established because the remote server is not responding. This could be because one of the network devices (e.g, firewalls, NAT, routers, etc) between your computer and the remote server is not configured to allow VPN connections. Please contact your Administrator or your service provider to determine which device may be causing the problem.

    Solved by using following command

    REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f
    
    REG ADD HKLM\SYSTEM\CurrentControlSet\Services\RasMan\Parameters /v ProhibitIpSec /t REG_DWORD /d 0x0 /f
    
    0 comments No comments

  2. Kapil Arya 7,766 Reputation points MVP
    2023-11-16T15:18:11.8233333+00:00

    Try these steps, see if this helps:

    Step 1. Open Control Panel, click View network status and tasks, and click Change adapter settings.

    Step 2. Right-click the VPN connection and select Properties.

    Step 3. Go to the Security tab, select L2TP/IPSec as the type of VPN, and click Advanced Settings.

    Step 4. Tick Use preshared key for authentication and click OK.

    0 comments No comments