Windows Server includes native VPN server capability (via the Routing and Remote Access role) — useful for secure remote access to your Windows infrastructure without relying on a separate Linux-based VPN solution.
When to Use Windows Server's Native VPN vs a Dedicated Solution
Windows' built-in VPN capability is convenient when you're already managing a Windows-centric environment and want native integration — for pure VPN-gateway use cases without other Windows Server dependencies, a dedicated solution (see How to Set Up a VPN Server with WireGuard) is often simpler and more modern.
Step 1 — Install the Routing and Remote Access Role
Install-WindowsFeature -Name RemoteAccess -IncludeManagementTools -Restart
Step 2 — Configure Routing and Remote Access
Install-RemoteAccess -VpnType RoutingOnly
Or use the graphical Routing and Remote Access console (rrasmgmt.msc) for a guided configuration wizard, generally easier for first-time setup.
Step 3 — Configure the VPN Protocol
Windows supports several VPN protocols (SSTP, L2TP/IPsec, PPTP — PPTP is outdated and should be avoided for security reasons) — SSTP is generally a solid choice, working well through most firewalls since it uses standard HTTPS port 443.
Step 4 — Configure a Certificate for SSTP
SSTP requires a valid SSL certificate on the server — see certificate installation guides (How to Install an SSL Certificate on IIS covers similar principles) for obtaining and installing an appropriate certificate.
Step 5 — Define the VPN Client IP Address Pool
Set-RemoteAccess -InternalIPv4NetworkConnectivity Enabled
Configure through the RRAS console: specify the range of IP addresses assigned to connecting VPN clients.
Step 6 — Configure User Access Permissions
By default, users need explicit dial-in permission — configure this either per-user (in Active Directory or local user properties) or via a Network Policy in NPS (Network Policy Server) for more centralized control.
Step 7 — Allow VPN Traffic Through the Firewall
Enable-NetFirewallRule -DisplayGroup "Routing and Remote Access"
Connecting from a Windows Client
Add a VPN connection in Windows Settings, specifying the server address and selecting the appropriate VPN type (SSTP) matching your server configuration.
Monitoring VPN Connections
Get-RemoteAccessConnectionStatistics
Considerations for a VPS-Hosted VPN Server
Verify your VPS provider's networking supports the VPN protocol you're using without unexpected restrictions, and ensure firewall rules are correctly scoped — a VPN server is a sensitive service warranting the same careful hardening attention as any other internet-facing service.
Common Errors
Client can't establish connection despite correct settings — verify the certificate for SSTP is valid and trusted, and check that the specific firewall rule allowing the chosen VPN protocol's traffic is actually enabled.
Continue Reading
- How to Set Up a VPN Server with WireGuard
- WireGuard vs OpenVPN: Choosing a VPN Protocol
- How to Configure Windows Firewall on a Windows VPS
Browse more articles in Windows Server Administration.