Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Always On VPN is a remote access solution in Windows Server that provides seamless and secure connectivity for remote users to corporate networks. It supports advanced authentication methods and integrates with existing infrastructure, offering a modern alternative to traditional VPN solutions. This tutorial begins the series to deploy Always On VPN in a sample environment.
In this tutorial, you learn how to deploy a sample infrastructure for Always On VPN connections for remote domain-joined Windows client computers. To create a sample infrastructure, you:
- Create an Active Directory domain controller.
- Configure Group Policy for autoenrollment of certificates.
- Create a Network Policy Server (NPS) server.
- Create a VPN server.
- Create a VPN user and group.
- Configure the VPN server as a RADIUS client.
- Configure the NPS server as a RADIUS server.
To learn more about Always On VPN, including supported integrations, security and connectivity features, see Always On VPN Overview.
Prerequisites
To complete the steps in this tutorial, you need to meet the following prerequisites:
Three servers (physical or virtual) running a supported version Windows Server. These servers are the domain controller, NPS server, and VPN server.
The server you use for the NPS server needs two physical network adapters installed: one to connect to the internet, and one to connect to the network where the domain controller is located.
A user account on all machines that is a member of the local Administrators security group, or equivalent.
Important
Using Remote Access in Microsoft Azure isn't supported. For more information, see Microsoft server software support for Microsoft Azure virtual machines.
Create the domain controller
On the server you want to be the domain controller, install Active Directory Domain Services (AD DS). For detailed information on how to install AD DS, see Install Active Directory Domain Services.
Promote the Windows Server to domain controller. For this tutorial, you create a new forest and the domain to that new forest. For detailed information on how to install the domain controller, see AD DS Installation.
Install and configure the Certificate Authority (CA) on the domain controller. For detailed information on how to install the CA, see Install the Certification Authority.
Configure Group Policy for autoenrollment of certificates
In this section, you create a Group Policy on the domain controller so that domain members automatically request user and computer certificates. This configuration enables VPN users to request and retrieve user certificates that automatically authenticate VPN connections. This policy also allows the NPS server to request server authentication certificates automatically.
On the domain controller, open the Group Policy Management console.
In the left pane, right-click your domain (for example,
corp.contoso.com
). Select Create a GPO in this domain, and Link it here.On the New GPO dialog box, for Name, enter Autoenrollment Policy. Select OK.
In the left pane, right-click Autoenrollment Policy. Select Edit to open the Group Policy Management Editor.
In Group Policy Management Editor, complete the following steps to configure computer certificate autoenrollment:
Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies.
In the details pane, right-click Certificate Services Client – Auto-Enrollment. Select Properties.
On the Certificate Services Client – Auto-Enrollment Properties dialog box, for Configuration Model, select Enabled.
Select Renew expired certificates, update pending certificates, and remove revoked certificates and Update certificates that use certificate templates.
Select OK.
In Group Policy Management Editor, complete the following steps to configure user certificate autoenrollment:
Navigate to User Configuration > Policies > Windows Settings > Security Settings > Public Key Policies.
In the details pane, right-click Certificate Services Client – Auto-Enrollment and select Properties.
On the Certificate Services Client – Auto-Enrollment Properties dialog box, in Configuration Model, select Enabled.
Select Renew expired certificates, update pending certificates, and remove revoked certificates and Update certificates that use certificate templates.
Select OK.
Close Group Policy Management Editor.
Apply the Group Policy to users and computers in the domain.
Close the Group Policy Management console.
Create the NPS server
On the server you want to be the NPS server, install the Network Policy and Access Services (NPS) role. For detailed information on how to install NPS, see Install Network Policy Server.
Register the NPS Server in Active Directory. For information on how to register NPS Server in Active Directory, see Register an NPS in an Active Directory Domain.
Make sure that your firewalls allow the traffic that is necessary for both VPN and RADIUS communications to function correctly. For more information, see Configure Firewalls for RADIUS Traffic.
Create the NPS Servers group:
On the domain controller, open Active Directory Users and Computers.
Under your domain, right-click Computers. Select New, then select Group.
In Group name, enter NPS Servers, then select OK.
Right-click NPS Servers and select Properties.
On the Members tab of the NPS Servers Properties dialog box, select Add.
Select Object Types, select the Computers check box, then select OK.
In Enter the object names to select, enter the hostname of the NPS server. Select OK.
Close Active Directory Users and Computers.
Create the VPN server
For the server that runs the VPN server, ensure that the machine has two physical network adapters installed: one to connect to the internet, and one to connect to the network where the domain controller is located.
Identify which network adapter connects to the internet and which network adapter connects to the domain. Configure the network adapter facing the internet with a public IP address, while the adapter facing the intranet can use an IP address from the local network.
For the network adapter connecting to the domain, set the DNS preferred IP address to the IP address of the domain controller.
Join the VPN server to the domain. For information on how to join a server to a domain, see To join a server to a domain.
Open your firewall rules to allow UDP ports 500 and 4500 inbound to the external IP address applied to the public interface on the VPN server. For the network adapter connecting to the domain, allow the following UDP ports: 1812, 1813, 1645, and 1646.
Create the VPN Servers group:
On the domain controller, open Active Directory Users and Computers.
Under your domain, right-click Computers. Select New, then select Group.
In Group name, enter VPN Servers, then select OK.
Right-click VPN Servers and select Properties.
On the Members tab of the VPN Servers Properties dialog box, select Add.
Select Object Types, select the Computers check box, then select OK.
In Enter the object names to select, enter the hostname of the VPN server. Select OK.
Close Active Directory Users and Computers.
Follow the steps in Install Remote Access as a VPN server to install the VPN server.
Open Routing and Remote Access from Server Manager.
Right-click the name of the VPN server, and then select Properties.
In Properties, select the Security tab and then:
Select Authentication provider and select RADIUS Authentication.
Select Configure to open the RADIUS Authentication dialog.
Select Add to open the Add RADIUS Server dialog.
In Server name, enter the Fully Qualified Domain Name (FQDN) of the NPS server, which is also a RADIUS server. For example, if the NetBIOS name of your NPS and domain controller server is
nps1
and your domain name iscorp.contoso.com
, enternps1.corp.contoso.com
.In Shared secret, select Change to open the Change Secret dialog box.
In New secret, enter a text string.
In Confirm new secret, enter the same text string, then select OK.
Save this secret. You need it when you add this VPN server as a RADIUS client later in this tutorial.
Select OK to close the Add RADIUS Server dialog.
Select OK to close the RADIUS Authentication dialog.
On the VPN server Properties dialog, select Authentication Methods....
Select Allow machine certificate authentication for IKEv2.
Select OK.
For Accounting provider, select Windows Accounting.
Select OK to close the Properties dialog.
A dialog prompts you to restart the server. Select Yes.
Create VPN user and group
Create a VPN user by taking the following steps:
- On the domain controller, open the Active Directory Users and Computers console.
- Under your domain, right-click Users. Select New. For User logon name, enter any name. Select Next.
- Choose a password for the user.
- Deselect User must change password at next logon. Select Password never expires.
- Select Finish. Keep Active Directory Users and Computers open.
Create a VPN user group by taking the following steps:
- Under your domain, right-click Users. Select New, then select Group.
- In Group name, enter VPN Users, then select OK.
- Right-click VPN Users and select Properties.
- On the Members tab of the VPN Users Properties dialog box, select Add.
- On the Select Users dialog box, add the VPN user that you created and select OK.
Configure VPN server as a RADIUS client
On the NPS server, open your firewall rules to allow UDP ports 1812, 1813, 1645, and 1646 inbound, including the Windows Firewall.
Open the Network Policy Server console.
In the NPS console, double-click RADIUS Clients and Servers.
Right-click RADIUS Clients and select New to open the New RADIUS Client dialog box.
Verify that the Enable this RADIUS client check box is selected.
In Friendly name, enter a display name for the VPN server.
In Address (IP or DNS), enter the IP address or the FQDN of the VPN server.
If you enter the FQDN, select Verify if you want to verify that the name is correct and maps to a valid IP address.
In Shared secret:
- Ensure that Manual is selected.
- Enter the secret that you created in the Create the VPN server section.
- For Confirm shared secret, reenter the shared secret.
Select OK. The VPN Server should appear in the list of RADIUS clients configured on the NPS server.
Configure NPS server as a RADIUS server
Register a server certificate for the NPS server, with a certificate that meets the requirements in Configure Certificate Templates for PEAP and EAP requirements. To verify that your Network Policy Server (NPS) servers are enrolled with a server certificate from the certification authority (CA), see Verify Server Enrollment of a Server Certificate.
In the NPS console, select NPS (Local).
In Standard Configuration, ensure that RADIUS server for Dial-Up or VPN Connections is selected.
Select Configure VPN or Dial-Up to open the Configure VPN or Dial-Up wizard.
Select Virtual Private Network (VPN) Connections, then select Next.
In Specify Dial-Up or VPN Server, in RADIUS clients, select the name of the VPN server.
Select Next.
In Configure Authentication Methods, complete the following steps:
Clear Microsoft Encrypted Authentication version 2 (MS-CHAPv2).
Select Extensible Authentication Protocol.
For Type, select Microsoft: Protected EAP (PEAP). Then select Configure to open the Edit Protected EAP Properties dialog box.
Select Remove to remove the Secured Password (EAP-MSCHAP v2) EAP type.
Select Add. The Add EAP dialog box opens.
Select Smart Card or other certificate, then select OK.
Select OK to close Edit Protected EAP Properties.
Select Next.
In Specify User Groups, complete the following steps:
Select Add. The Select Users, Computers, Service Accounts, or Groups dialog box opens.
Enter VPN Users, then select OK.
Select Next.
On Specify IP Filters, select Next.
On Specify Encryption Settings, select Next. Don't make any changes.
On Specify a Realm Name, select Next.
Select Finish to close the wizard.
Next step
Now you created your sample infrastructure, you're ready to begin configuring your Certificate Authority.