Turning a Windows VPS into a VPN endpoint is one of the highest-value things you can do with an idle server, and Windows Server ships everything required through the Remote Access role. The interesting part is not whether it works — it’s which tunnel type to choose. SSTP, L2TP/IPsec and IKEv2 behave very differently behind NAT, through restrictive client firewalls, and under roaming, and picking the wrong one produces connection failures that look like server problems but are really protocol mismatches.
This comparison assumes you already have a hosted server you can reach over RDP. If not, start with the Windows VPS guides for provisioning and first connection, then come back. Everything below is done from an elevated PowerShell session on the server.
Install the Role and Understand What You’re Getting
Install-WindowsFeature DirectAccess-VPN -IncludeManagementTools installs the Remote Access management console and the RemoteAccess module. Note the module name: Get-VpnServerConfiguration and Add-VpnIPAddressRange are Remote Access cmdlets, not Routing cmdlets. On Server Core the same role installs without the GUI and is configured entirely through PowerShell — which is often the better path on a small VPS with 2 GB of RAM.
Before configuring any protocol, plan the address pool. A VPN client needs an IP on a subnet the server can route to. On a typical VPS with one public NIC, use Add-VpnIPAddressRange -StartIPAddress 10.10.10.1 -EndIPAddress 10.10.10.50. Do not hand out addresses from the provider’s own LAN range; you will create asymmetric routing and the client will connect but pass no traffic.
NAT is the second prerequisite. With a single NIC the server must translate VPN traffic out of the public interface: New-NetNat -Name VPNNAT -InternalIPInterfaceAddressPrefix 10.10.10.0/24. Without this, clients authenticate, receive an address, and reach nothing — the classic “VPN connects but no internet” symptom.
SSTP: TCP 443 and the Best NAT Traversal
SSTP wraps PPP inside an HTTPS session over TCP 443. That single fact explains its main advantages: it passes through almost every hotel, airport and corporate firewall, because blocking 443 breaks the web. It also means the server needs a valid TLS certificate bound to the SSTP listener — a self-signed certificate produces error 0x800B0109 (CERT_E_UNTRUSTEDROOT) or the more common 0x8007274C (connection timed out) when the client rejects the chain.
Bind the certificate by thumbprint: Set-VpnSstpConfig -CertificateThumbprint <thumbprint> -RequireSslCertCheck $true. The certificate must have the server’s public FQDN in the Subject or SAN, because clients connect to https://vpn.example.com:443/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/ under the hood and validate against that name.
The trade-off is TCP-over-TCP meltdown. When packet loss occurs, both the outer TCP stream and the inner PPP stream retransmit, and throughput collapses on high-latency links. For a client on a flaky 4G connection, SSTP can feel far slower than it should. It is best for locked-down networks where nothing else gets through.
L2TP/IPsec: UDP 500, 4500 and the NAT-T Trap
L2TP runs inside IPsec, which means it is natively supported by Windows, macOS, iOS, Android and most routers without extra client software. It needs UDP 500 (IKE), UDP 4500 (NAT-T) and ESP (protocol 50) permitted inbound. Most providers’ firewalls handle UDP fine, but ESP is often the sticking point — a stateful firewall that drops protocol 50 produces a connection that hangs at “Verifying your credentials”.
Configure a pre-shared key with Set-VpnAuthProtocol -UserAuthProtocol PAP -TunnelAuthProtocol Psk -SharedSecret 'long-random-string'. Windows clients require the PSK stored as a credential: under Windows 10/11, tick “Use pre-shared key for authentication” and enter it exactly. A mismatch gives error 789 (“The L2TP connection attempt failed because the security layer encountered a processing error”). Error 809 means UDP 500/4500 are blocked; 691 means bad credentials.
PSK is shared-secret authentication with no forward secrecy and is considered weak for anything beyond small trusted groups. Where you can, prefer certificate-based IPsec or move to IKEv2. Also note that L2TP does not survive NAT changes gracefully — a laptop switching from Wi-Fi to cellular drops the tunnel and requires a manual reconnect.
IKEv2: Mobility and Reconnect Without Dropping
IKEv2 uses UDP 500 and 4500 with MobIKE support, which lets the client keep the tunnel alive across IP address changes. That makes it the right choice for laptops and phones. Windows’ built-in “Always On VPN” and the default IKEv2 client profile both support it, as do iOS and Android natively.
Server-side, enable it via Set-VpnServerIPsecConfiguration -EncryptionType MaximumEncryption -SADataSizeForRenegotiationKilobytes 102400 and ensure the server certificate is issued by a CA the client trusts. IKEv2 will not accept the self-signed fallback that L2TP-PSK tolerates. Username/password with EAP-MSCHAPv2 is common, but certificate-based machine authentication is what makes Always On VPN reliable.
Common failures: error 13801 means the server’s machine certificate lacks the Server Authentication EKU or is not trusted; 13868 indicates an IPsec policy mismatch, often caused by a leftover L2TP policy on the same server. Do not enable L2TP and IKEv2 on the same NIC without checking that the IPsec policies do not conflict — Get-NetIPsecRule will show the duplicates.
Quick Comparison
SSTP: TCP 443, certificate required, best firewall traversal, worst under packet loss, no client install on Windows. L2TP/IPsec: UDP 500/4500 plus ESP, PSK or certificate, universal client support, weak default authentication, does not roam. IKEv2: UDP 500/4500, strong auth, best mobility, most sensitive to certificate configuration. If you need one protocol for a mixed fleet of Windows and mobile clients, IKEv2 with a proper CA-issued certificate is the default answer; keep SSTP as a fallback profile for hostile networks.
Size accordingly: IPSec and SSTP both cost CPU per session, and 20 simultaneous tunnels on a 2 vCPU instance with encryption enabled will show measurable throughput drop. If you are consolidating VPN, IIS and RDS on one box, compare Windows VPS plans before you commit; adding vCPU later is usually easier than migrating.
Verifying and Locking Down the Result
Confirm the listener with Get-RemoteAccess and Get-VpnS2SInterface, then check live sessions in Get-RemoteAccessConnectionStatistics. Firewall rules are created automatically under the “Routing and Remote Access” group; verify with Get-NetFirewallRule -DisplayGroup "Routing and Remote Access". If a client cannot connect and the server logs nothing, the traffic is being dropped upstream — open a ticket with the provider before changing server config.
Finally, restrict who can use the tunnel. VPN access is controlled by the dial-in property on the user account (Set-ADUser -Identity user -AllowDialIn $true, or local equivalent), and NPS policies can require group membership and time-of-day restrictions. On an internet-facing VPS, enable logging for failed authentications and watch for repeated 691s — they are the fingerprint of a brute-force attempt against your VPN endpoint.



