Setup l2tp vpn windows server 2022

RDR-IT » Tutorial » Windows Server » General » VPN Server with Windows Server: Installation and Configuration

Contents

  • 1. Intro
  • 2. Installing the Remote Access role
  • 3. VPN Server Configuration
  • 4. Configure the VPN connection on Windows 10
  • 5. VPN in PPTP
  • 6. VPN in SSTP

In this tutorial, I will explain how to set up a VPN server on Windows Server with the role of remote access and configure access with NPS.

When setting up a VPN server with Windows, 3 types of VPN service are installed:

  • PPTP
  • L2TP
  • SSTP

In this tutorial we will see how to use PPTP and SSTP. When configuring the VPN client on Windows it is configured automatically and will test the connections on different ports to find the type of VPN service.

In order to limit the right of connection to the VPN, the policy will be configured to allow users belonging to the Active Directory group GRP_SRV_VPN_ALLOW.

The IP addresses will be distributed by a DHCP server.

When configuring the VPN client on Windows, the type of VPN is configured automatically, when connecting it will test the different types to establish the connection. There are several methods to force a type:

  • Configuration on the VPN client.
  • Port configuration at the firewalls level.
  • Configuration on NPS in the policy.



Im trying to enable VPN server(L2TP) inside windows 2022. everything goes as plan but in the end

the Remote Access Management Console Shows this error :

Setup l2tp vpn windows server 2022

Ive also added rule for 1701 port in firewall like this (inbound and outbound) :

Setup l2tp vpn windows server 2022

but still im getting the close port error.

if i do

netstat -ab

in cmd i get this :

Setup l2tp vpn windows server 2022

And finally if i run this in powershell :

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

the problem will go away and all three checkmark will become green in operation status , but i got this error in client vpn :

Setup l2tp vpn windows server 2022

Update : With suggestion Ive disabled the Default rule and add these one instead :

New-NetFirewallRule -DisplayName "VPNTCP" -Direction inbound -Profile Any -Action Allow -LocalPort 1723,1701,443 -Protocol TCP

New-NetFirewallRule -DisplayName "VPNUDP" -Direction inbound -Profile Any -Action Allow -LocalPort 500,4500,1701 -Protocol UDP

New-NetFirewallRule -DisplayName "GRE" -Direction inbound -Protocol 47 -Profile Any -Action Allow

Now it shows all green.

Setup l2tp vpn windows server 2022

but still i cant connect to server from client and it shows this error :

The l2tp connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer

Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Always On VPN deployment for Windows Server and Windows 10

  • Article
  • 10/10/2022
  • 3 minutes to read

In this article

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows 10

Always On VPN provides a single, cohesive solution for remote access and supports domain-joined, nondomain-joined (workgroup), or Azure AD–joined devices, even personally owned devices. With Always On VPN, the connection type does not have to be exclusively user or device but can be a combination of both. For example, you could enable device authentication for remote device management, and then enable user authentication for connectivity to internal company sites and services.

Prerequisites

You most likely have the technologies deployed that you can use to deploy Always On VPN. Other than your DC/DNS servers, the Always On VPN deployment requires an NPS (RADIUS) server, a Certification Authority (CA) server, and a Remote Access (Routing/VPN) server. Once the infrastructure is set up, you must enroll clients and then connect the clients to your on-premises securely through several network changes.

  • Active Directory domain infrastructure, including one or more Domain Name System (DNS) servers. Both internal and external Domain Name System (DNS) zones are required, which assumes that the internal zone is a delegated subdomain of the external zone (for example, corp.contoso.com and contoso.com).
  • Active Directory-based public key infrastructure (PKI) and Active Directory Certificate Services (AD CS).
  • Server, either virtual or physical, existing or new, to install Network Policy Server (NPS). If you already have NPS servers on your network, you can modify an existing NPS server configuration rather than add a new server.
  • Remote Access as a RAS Gateway VPN server with a small subset of features supporting IKEv2 VPN connections and LAN routing.
  • Perimeter network that includes two firewalls. Ensure that your firewalls allow the traffic that is necessary for both VPN and RADIUS communications to function properly. For more information, see Always On VPN Technology Overview.
  • Physical server or virtual machine (VM) on your perimeter network with two physical Ethernet network adapters to install Remote Access as a RAS Gateway VPN server. VMs require virtual LAN (VLAN) for the host.
  • Membership in Administrators, or equivalent, is the minimum required.
  • Read the planning section of this guide to ensure that you are prepared for this deployment before you perform the deployment.
  • Review the design and deployment guides for each of the technologies used. These guides can help you determine whether the deployment scenarios provide the services and configuration that you need for your organization's network. For more information, see Always On VPN Technology Overview.
  • Management platform of your choice for deploying the Always On VPN configuration because the CSP is not vendor-specific.

Important

For this deployment, it is not a requirement that your infrastructure servers, such as computers running Active Directory Domain Services, Active Directory Certificate Services, and Network Policy Server, are running Windows Server 2016. You can use earlier versions of Windows Server, such as Windows Server 2012 R2, for the infrastructure servers and for the server that is running Remote Access.

Do not attempt to deploy Remote Access on a virtual machine (VM) in Microsoft Azure. Using Remote Access in Microsoft Azure is not supported, including both Remote Access VPN and DirectAccess. For more information, see Microsoft server software support for Microsoft Azure virtual machines.

About this deployment

The instructions provided walk you through deploying Remote Access as a single tenant VPN RAS Gateway for point-to-site VPN connections, using any of the scenarios mentioned below, for remote client computers that are running Windows 10. You also find instructions for modifying some of your existing infrastructure for the deployment. Also throughout this deployment, you find links to help you learn more about the VPN connection process, servers to configure, ProfileXML VPNv2 CSP node, and other technologies to deploy Always On VPN.

Always On VPN deployment scenarios:

  1. Deploy Always On VPN only.
  2. Deploy Always On VPN with conditional access for VPN connectivity using Azure AD.

For more information and workflow of the scenarios presented, see Deploy Always On VPN.

What isn't provided in this deployment

This deployment does not provide instructions for:

  • Active Directory Domain Services (AD DS).
  • Active Directory Certificate Services (AD CS) and a Public Key Infrastructure (PKI).
  • Dynamic Host Configuration Protocol (DHCP).
  • Network hardware, such as Ethernet cabling, firewalls, switches, and hubs.
  • Additional network resources, such as application and file servers, that remote users can access over an Always On VPN connection.
  • Internet connectivity or Conditional Access for Internet connectivity using Azure AD. For details, see Conditional access in Azure Active Directory.

Next steps

  • Learn more about the Always On VPN features and functionality

  • Learn more about the Always On VPN enhancements

  • Learn about some of the advanced Always On VPN features

  • Learn more about the Always On VPN technology

  • Start planning your Always On VPN deployment

Feedback

Submit and view feedback for