What ports do I need to open in my firewall to allow Windows VPN solutions to work?

Posted: (EET/GMT+2)

 

When setting up Windows-based VPN connections, it's common to forget that VPN protocols rely on specific network ports. If these ports aren't open in your firewall, connections may fail silently or time out.

Here's a quick summary of the ports used by common Windows VPN types:

  • PPTP (Point-to-Point Tunneling Protocol): TCP port 1723 and IP protocol 47 (GRE)
  • L2TP over IPsec: UDP ports 500, 1701, and 4500, plus IP protocol 50 (ESP)
  • SSTP (Secure Socket Tunneling Protocol): TCP port 443
  • IKEv2: UDP ports 500 and 4500

Most corporate environments today use either L2TP/IPsec or SSTP. SSTP has the advantage of working over HTTPS (port 443), which usually passes through firewalls without special configuration.

If your VPN clients connect through NAT or a strict corporate firewall, IKEv2 and L2TP may require additional configuration. Remember that IP protocols 47 (GRE) and 50 (ESP) are not TCP/UDP ports, they must be explicitly allowed by your firewall software or appliance.

As always, make sure Windows Firewall on the server side also has inbound rules for the VPN service. On recent Windows Server versions, these rules are created automatically when you install the Remote Access role with VPN support.

Knowing the correct ports upfront saves hours of troubleshooting "connection cannot be established" errors when setting up VPN solutions on Windows.