problem connecting a VPN server with L2TP/IPSEC security

kader kader 66 Reputation points
2022-05-22T01:45:23+00:00

I just deployed a VPN server under Windows server 2019. My problem is this message during the connection: the l2tp connection attempt failed because the security layer encountered an error.

This test was done on the server itself locally, whereas with the connection in PPTP mode it works without any problem.

I would like to have your opinion please, because it is the first time that I do it with Windows. Usually I do it with Pfsense.

The machine is installed on hyper-v.

Thanks in advance!
Greeting.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
0 comments No comments
{count} vote

Accepted answer
  1. risolis 8,701 Reputation points
    2022-05-25T03:44:26.833+00:00

    @kader kader

    Please confirm if the steps taken so far from you are the ones below:

    -VPN Properties >>>>>>>>> Routing and Remote Access>>>>>>>>>Allow custom IPSec policy for L2TP/IKEv2 connection
    -IPv4 tab >>>>>>>>> Enable IPv4 forwarding >>>>>>>>>Static address pool
    -NAT tab >>>>>>>>> New interface >>>>>>>>> Public interface connected to Internet >>>>>>>>>Enable NAT on this interface
    -Port tab >>>>>>>>> VPN Server(L2TP/IPSec on this server)
    -Change IP address to 127.0.0.1
    -Restart required
    -Firewall settings configuration >>>>>> Inbound/outbound rules (allow Routing and remote access) >> Allow the connection
    -VPN user profile set up (Allow the user connection)
    -Recall to share the PSK(Preshared KEY with all users)

    Looking forward to your feedback,

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


7 additional answers

Sort by: Most helpful
  1. risolis 8,701 Reputation points
    2022-05-23T00:41:09.58+00:00

    Hello @kader kader

    Thank you for your post.

    If you made testing about it... I just wonder if there is NAT in between as well as the following settings are set up correctly:

    server name/address
    authentication method
    User Credentials

    Also, review the next article.

    https://www.wintips.org/fix-the-l2tp-connection-attempt-failed-because-the-security-layer-encountered-a-processing-error-during-initial-negotiations-with-the-remote-computer-solved/

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. kader kader 66 Reputation points
    2022-05-23T18:20:48.847+00:00

    Hello, yes the server is behind a Pfsense firewall.


  3. kader kader 66 Reputation points
    2022-05-24T01:42:50.08+00:00

    Tomorrow I will send you the screenshots.
    greeting.


  4. kader kader 66 Reputation points
    2022-05-24T16:01:27.1+00:00

    205221-vpn-erreur.png