DNS server configuration for Windows 10 Always On VPN clients is crucial to ensuring full access to internal resources. For Always On VPN, there are a few different ways to assign a DNS server to VPN clients.
Default DNS Servers
By default, Windows 10 clients use the same DNS server the VPN server is configured to use. This is true even if the VPN client IP address assignment method is DHCP.
There may be some scenarios in which this is not appropriate. For example, if the DNS server is in a DMZ network and is not configured to use internal Active Directory domain DNS servers, clients will be unable to access internal resources.
DNS Server Assignment
To configure Windows 10 Always On VPN clients to use DNS servers other than those configured on the VPN server, configure the DomainNameInformation element in the ProfileXML, as shown here.
Once the DomainNameInformation element has been defined, the new DNS server assignment does NOT appear on the VPN virtual adapters interface. In fact, it will still be configured to use the DNS server assigned to the VPN server, just as before. Using the DomainNameInformation element instead configures the Name Resolution Policy Table (NRPT) and assigns the new DNS server to the namespace defined by the administrator. You can view the NRPT running the Get-DnsClientNrptPolicy PowerShell command.
Always On VPN is the replacement for Microsoft’s popular DirectAccess remote access solution. It provides the same seamless, transparent, always on remote connectivity as DirectAccess. Where DirectAccess relied heavily on classic on-premises infrastructure such as Active Directory and Group Policy, Always On VPN is infrastructure independent and is designed to be provisioned and managed using a Mobile Device Management (MDM) platform such as Microsoft Intune.
Update: This post was published in 2018, and the Intune admin center has changed since then. Today, sign in to the Microsoft Intune admin center (https://intune.microsoft.com/), go to Devices > Configuration, select Create > New Policy, choose the Windows 10 and later platform, and select Templates > VPN. The VPN settings themselves are largely the same as shown below. The native VPN template is also the more reliable option for Windows 11 (see Always On VPN Disconnects in Windows 11).
Intune and Always On VPN
Until recently, provisioning Always On VPN connections involved manually creating a ProfileXML and uploading to Intune using a custom profile. This has proven to be challenging for many, as the process is unintuitive and error prone.
A recent Intune update now allows administrators to create a basic Always On VPN deployment. Although it still has its limitations, it will go a long way to making the adoption of Always On VPN easier.
Prerequisites
Certificates must first be provisioned to all clients before deploying Always On VPN using Intune. In addition, if using a third-party VPN client, the VPN plug-in software must be installed prior to deploying the VPN profile.
Test VPN Connection
It is recommended that a test VPN connection be created on a client machine locally before deploying an Always On VPN profile using Intune. This allows the administrator to test connectivity and validate Extensible Authentication Protocol (EAP) settings. Once complete, run the following PowerShell commands to extract the EAP configuration settings to a file for later publishing with Intune.
Follow the steps below to deploy an Always On VPN connection using Intune.
Create a VPN Profile
Open the Microsoft Intune admin center.
Click Device configuration.
Click Profiles.
Click Create profile.
Enter a name for the VPN profile.
Enter a description (optional).
From the Platform drop-down menu select Windows 10 and later.
From the Profile type drop-down menu select VPN.
In the Settings section click Configure.
Define VPN Profile Settings
Click Base VPN.
Enter a name for the connection.
Enter a description and provide the Fully Qualified Domain Name (FQDN) of the VPN server. If it will be the default server select True and click Add.
Enter a description and provide the FQDN for any additional VPN servers, as required.
From the Connection type drop-down list choose the preferred connection type.
In the Always On section click Enable.
Select Enable to Remember credentials at each logon (optional).
Click Select a certificate.
Choose a client authentication certificate and click Ok.
Paste the contents of eapconfig.xml (saved previously) in the EAP Xml field.
Click Ok.
Define Additional Settings
You can also configure the following optional VPN settings using Intune.
Apps and Traffic Rules
Conditional Access
DNS Settings
Proxy
Split Tunneling
After configuring any required additional settings, click Create.
Assign VPN Profile
Click Assignments.
From the Assign to drop-down menu choose Selected Groups.
Click Select groups to include.
Choose a Microsoft Entra group to apply the VPN profile and click Select.
Click Save.
Limitations
Although the ability to provision Always On VPN using Microsoft Intune without using a custom profile is welcome, it is not without its limitations. At the time of this writing, only Always On VPN user profiles can be configured. A device tunnel, which is optional, must be configured manually using a custom profile. In addition, the Intune user interface lacks the ability to define settings for the following parameters:
Custom IKEv2 cryptography policy
Exclusion routes
Lockdown mode
To make changes to the default settings for any of the above parameters, a ProfileXML must be created manually and provisioned with Intune using a custom policy.
The Name Resolution Policy Table (NRPT) is a function of the Windows client and server operating systems that allows administrators to enable policy-based name resolution request routing. Instead of sending all name resolution requests to the DNS server configured on the computer’s network adapter, the NRPT can be used to define unique DNS servers for specific namespaces.
DirectAccess administrators will be intimately familiar with the NRPT, as it is explicitly required for DirectAccess operation. Use of the NRPT for Always On VPN is optional, however. It is commonly used for deployments where split DNS is enabled. Here the NRPT can define DNS servers for the internal namespace, and exclusions can be configured for FQDNs that should not be routed over the VPN tunnel.
To enable the NRPT for Always On VPN, edit the ProfileXML to include the DomainNameInformation element.
Always On VPN and DirectAccess both provide seamless, transparent, always on remote network access for Windows clients. However, Always On VPN is provisioned to the user, not the machine as it is with DirectAccess. This presents a challenge for deployment scenarios that require the VPN connection to be established before the user logs on. For example, pre-logon connectivity is required to support remote logon without cached credentials. To address this issue and to provide feature parity with DirectAccess, Microsoft introduced support for a device tunnel configuration option beginning with Windows 10 version 1709 (Fall creators update).
Note: Although this post was originally written for Windows 10, the same steps apply to Windows 11 Enterprise and Education. Windows 10 reached end of support in October 2025.
Learn Always On VPN today! Register for an upcoming Always On VPN Hands-On Training class. More details here!
Prerequisites
To support an Always On VPN device tunnel, the client computer must be running Windows 11 Enterprise or Education, or Windows 10 Enterprise or Education version 1709 (Fall creators update) or later. It must also be domain-joined and have a computer certificate with the Client Authentication Enhanced Key Usage (EKU) issued by the organization’s Public Key Infrastructure (PKI).
In addition, only the built-in Windows VPN client is supported for Always On VPN device tunnel. Although Always On VPN user connections can be configured using various third-party VPN clients, they are not supported for use with the device tunnel.
VPN ProfileXML
The Always On VPN device tunnel is provisioned using an XML file. You can download a sample VPN ProfileXML file here. Make any changes required for your environment such as VPN server hostnames, routes, traffic filters, and remote address ranges. Optionally include the trusted network detection code, if required. Do not change the protocol type or authentication methods, as these are required.
Once the ProfileXML file is created, it can be deployed using Intune, Configuration Manager, or PowerShell. In this post I’ll cover how to configure the Always On VPN device tunnel using PowerShell.
Client Configuration
Download the PowerShell script located here and then copy it to the target client computer. The Always On VPN device tunnel must be configured in the context of the local system account. To accomplish this, it will be necessary to use PsExec, one of the PsTools included in the Sysinternals suite of utilities. Download PsExec here, copy it to the target machine, and then run the following command in an elevated PowerShell command window.
Another elevated PowerShell window will open, this one now running in the context of the local system account. In this window, navigate to the folder where you copied the PowerShell script and XML file to. Run the PowerShell script and specify the name of the ProfileXML file, as shown below.
To verify creation of the VPN device tunnel, run the following PowerShell command.
Get-VpnConnection -AllUserConnection
Note: In Windows 10 releases prior to 1903 the ConnectionStatus will always report Disconnected. This has been fixed in Windows 10 1903.
Server Configuration
If you are using Windows Server 2012 R2 or Windows Server 2016 Routing and Remote Access Service (RRAS) as your VPN server, you must enable machine certificate authentication for VPN connections and define a root certification authority for which incoming VPN connections will be authenticated with. To do this, open an elevated PowerShell command and run the following commands.
Using PowerShell to provision an Always On VPN device tunnel is helpful for initial testing and small pilot deployments, but it does not scale very well. For production deployments it is recommended that Microsoft Intune be used to deploy Always On VPN device tunnel.
Deploy Device Tunnel with Intune
Guidance for deploying an Always On VPN device tunnel using Microsoft Intune can be found here. You can also view the following demonstration video that includes detailed guidance for provisioning the Always On VPN device tunnel using Microsoft Intune.
Summary
Once the Always On VPN device tunnel is configured, the client computer will automatically establish the connection as soon as an active Internet connection is detected. This will enable remote logins for users without cached credentials, and allow administrators to remotely manage Always On VPN clients without requiring a user to be logged on at the time.