Install and configure L2TP/IPSec VPN on Windows Server 2022

shape
shape
shape
shape
shape
shape
shape
shape

Have you heard of L2TP/IPsec? It’s a type of VPN protocol that combines the Layer 2 Tunneling Protocol (L2TP) and the Internet Protocol Security (IPsec) protocol to create a secure, encrypted connection between two devices over the Internet. In this post, we’ll explain how to configure L2TP/IPsec. Read on to find out more!

  1. We will need to install Windows Server Remote Access Roles, we will check the following options:
    -VPN (RAS)
    -Routing

2. We’ll click on the Flag in the top right corner of Server Management and click on configure VPN (RAS).

3. Go to the option to configure VPS only, this will open the main RAS screen.

4. Let’s right-click on the name of our machine and select “Configure and Enable Routing and Remote Access”.

5. The configuration is simple and standard, let’s go “Next”, select “Custom configuration”, select the “NAT” and “VPN access” options and then finish and start the service.

6. Now, to configure IPSec, let’s right-click on the hostname again and go to “Property”, go to the “Security” tab and check the option “Allow customized IPSec policy for L2TP/IKEv2 connection”, this will enable the “Pre-Shared Key” field where you enter the IPSec password to configure the VPN and then “Apply”.

7. Now go to the “IPv4” tab and change the IPv4 address assignment to Static address pool, click Add and enter an IP range for the VPN to distribute.

8. Let’s allow Outgoing/Incoming Routing and Remote Access on the firewall, just add the Default rule, select all the options and always Allow the connection.

9. Now we’ll have to go to Local Users and Groups and allow our user to make the connection.
-Right-click on the user, go to properties.
-Go to the “Dialing” tab
-In the “Allow Network Access” section you click on “Allow access”.
-Now just apply it.

10. Finally, let’s run the following codes to check that everything is OK:
– Install-WindowsFeature RemoteAccess
– Install-WindowsFeature DirectAccess-VPN -IncludeManagementTools
– Install-WindowsFeature Routing -IncludeManagementTools
If they all come back as “NoChangeNeeded”, everything is ready.

Once this configuration is complete, you can now set up this VPN with your server IP and Pre-Defined Key and use the VPN!

See our video tutorial on this process below:


See you next time!

Master da Web, your Cloud solution! ☁️

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest news

Latest news directly from our blog.