Skip to content

How to Configure a Secure IKEv2 Remote Access VPN with RRAS Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.

Define an IKEv2 VPN and its authentication model

An IKEv2 remote-access VPN creates an authenticated IPsec tunnel between a client and the RRAS server. The tunnel protects traffic carried through it, but it does not decide which internal resources the user may access or whether the endpoint is trustworthy. This guide uses a certificate-based IKEv2 server identity and certificate-based EAP-TLS user authentication through NPS. It deliberately avoids a password-only fallback and requires the matching PKI and client configuration.

Remote-access IKEv2 differs from a site-to-site demand-dial interface and from an Always On VPN device tunnel. Those designs have different authentication, provisioning and routing requirements. Establish the user group, allowed resources, split- or full-tunnel policy, client-certificate lifecycle and revocation response before deploying the endpoint. RRAS plus NPS does not automatically provide MFA; additional authentication services need their own supported design.

Prepare names, addresses and certificate trust

Reserve a public DNS name such as vpn.corp.example and make it resolve to the actual reachable VPN endpoint. Install an appropriate VPN server certificate with its private key in the server’s Local Computer personal store. Its subject alternative name must match the name clients use, its chain must be trusted, and its purposes must meet the IKEv2 deployment requirements, including the relevant server authentication and IP security IKE intermediate purpose where required by the Microsoft design.

For EAP-TLS, the NPS server needs a suitable server-authentication certificate for the EAP exchange, and users need valid client-authentication certificates with private keys and correct identity mapping. The RRAS and NPS certificates serve related but distinct roles. Ensure clients can validate both expected server identities and reach the required CRL or OCSP locations before the VPN exists. A certificate whose revocation path is reachable only through the tunnel creates a bootstrap failure.

Choose a VPN address pool that does not overlap common client home networks or corporate subnets, and ensure internal routers have a return path to that pool through RRAS. Decide which DNS servers and internal suffixes clients need. Keep administrative console access available while gateway routes and firewall rules change.

Install and initialize VPN-only RRAS

Confirm platform support before installation, including Microsoft’s restriction on deploying this Remote Access role in an Azure VM. On a supported server, install the VPN role service and use the VPN-only setup path. Do not use DirectAccess deployment options for this ordinary RRAS design.

Install-WindowsFeature -Name DirectAccess-VPN -IncludeManagementTools
Get-WindowsFeature DirectAccess-VPN
Get-ChildItem Cert:\LocalMachine\My | Select-Object Subject,Thumbprint,NotAfter,HasPrivateKey

Open the Remote Access getting-started workflow and choose Deploy VPN only. In Routing and Remote Access, use Configure and Enable Routing and Remote Access, select Custom configuration and enable VPN access. Start the service after reviewing the selected function. If the server already has RRAS configuration, preserve it and integrate the change rather than resetting the gateway. Confirm the intended server certificate is available and suitable before exposing the endpoint to clients.

Limit protocols and configure the client pool

In the RRAS server properties, configure IPv4 address assignment with the approved static pool, such as a specifically reserved 10.60.20.0/24 range. Do not use the sample range without checking overlap and routing. In Ports properties, enable the required WAN Miniport IKEv2 remote-access ports and size their count for the planned concurrent clients. Disable unused PPTP, L2TP and SSTP remote-access or demand-dial acceptance for this IKEv2-only design.

New Windows Server 2025 RRAS setups no longer accept PPTP and L2TP by default, but an in-place upgrade or existing configuration can retain older behaviour. Therefore inspect the actual port and policy configuration on every release. Permit UDP 500 and 4500 to the VPN endpoint through Windows Firewall and upstream devices, accounting for NAT traversal and the actual topology. A TCP port test cannot validate these UDP/IPsec exchanges.

Review IPsec cryptographic policy against the organization’s baseline and supported clients. If using a custom policy, configure matching client and server settings and pilot them; do not paste obsolete DH or cipher values from an unrelated compatibility example. Keep weak protocols disabled rather than enabling them as a fallback when IKEv2 troubleshooting is incomplete.

Configure RADIUS and a narrow EAP-TLS NPS policy

Install and register NPS as described in the related guide. When NPS is separate from RRAS, add RRAS as a RADIUS client using the source address NPS actually sees and a strong protected shared secret. Point RRAS authentication and accounting to that server and permit only the required peer-to-peer RADIUS traffic. Local NPS uses a different relationship and should not be assigned an invented network peer.

Create a network policy limited to the approved VPN-users group and the appropriate VPN access type. Select Microsoft Smart Card or other certificate as the EAP method and choose the intended NPS server certificate. Remove authentication methods the design does not permit. Review policy order, connection-request routing and any dial-in permission behaviour so another earlier policy does not accept the user with weaker settings.

Use a small pilot group first. Confirm the certificate mapping, trust and revocation requirements for those users. Do not grant all domain users access or turn off certificate validation to make a policy match. Enable useful NPS authentication and accounting records and protect their retention because they contain identity and connection evidence.

Provision a client that validates the right servers

Deploy the VPN profile and EAP-TLS configuration through the approved management tool or a reviewed client setup. Set the VPN endpoint to vpn.corp.example, choose IKEv2 explicitly and configure the certificate EAP method. Pin the expected authentication-server names and trusted issuing roots in the EAP configuration so a user is not asked to accept an arbitrary authentication server.

Install the approved client certificate and chain in the store appropriate to this user-authentication design. Keep private keys protected and verify the certificate can be selected for the intended identity. Configure split-tunnel routes or full-tunnel behaviour deliberately; the mere presence of a VPN connection does not show that sensitive application traffic is inside it.

# On a Windows pilot client:
Get-VpnConnection -Name 'Corporate IKEv2'
Get-ChildItem Cert:\CurrentUser\My | Select-Object Subject,NotAfter,HasPrivateKey
# After connecting, inspect assigned addresses and routes:
Get-NetIPConfiguration
Get-NetRoute -AddressFamily IPv4

For AD-backed certificate authentication, verify strong certificate-to-account mapping under the current domain-controller enforcement requirements. A UPN that merely looks correct is not sufficient evidence of a strong mapping. Current updates no longer support the old compatibility-mode registry escape described in older deployment notes; correct certificate issuance or an approved strong explicit mapping and inspect domain-controller authentication events.

Test authorized and rejected access from outside

Test from a genuinely external network, not just the VPN server’s own LAN. An authorized pilot user with a valid certificate should connect, receive an address from the intended pool, resolve approved internal names and reach the required application ports. A user outside the policy group and a client without an acceptable certificate should be rejected. Verify that unapproved internal services remain inaccessible through network controls.

Correlate the client’s RasClient and IKE events with RRAS and NPS events, including NPS grant or deny evidence where auditing is enabled. A tunnel that connects but cannot reach resources usually points to routes, return paths, DNS or firewall policy. A failure before authentication points toward endpoint reachability, IKE negotiation or certificate validation. Preserve exact error codes and timestamps rather than changing every layer at once.

Recover from failures without weakening the design

For certificate failures, inspect names, purposes, expiry, private-key presence, chain trust, mapping and revocation reachability. For authentication denial, identify the actual NPS policy and reason. For transport failures, examine UDP 500/4500, NAT and upstream platform restrictions. Do not disable revocation checking, accept arbitrary server certificates or enable PPTP as a troubleshooting shortcut.

Rollback should remove the pilot profile and restore only the changed gateway and NPS settings from the baseline while preserving logs. Keep valid existing users on their approved access path until the pilot is accepted. Document pool routes, endpoint names, certificate renewal, policy ownership, revocation response and capacity. Test renewals and rejected access periodically so the VPN remains secure when certificates, clients and Windows Server versions change.

Related guidance and official references

Install RRAS; Install and register NPS; Request a web server certificate; Revoke a certificate and publish a CRL.


Was this answer helpful?

« Back