L2TP, IPsec and PPTP Ports: Which VPN Port Do You Need?

Updated on

The L2TP port is UDP 1701. If your VPN profile says L2TP/IPsec, IPsec protects the L2TP traffic. An internet-facing router commonly sees UDP 500 for setup and UDP 4500 when the encrypted tunnel crosses a router that translates addresses (NAT). For PPTP, the combination is TCP 1723 plus GRE.

Connecting to a work or commercial VPN? You can usually leave your home router’s inbound port-forwarding settings alone. The client starts the connection. If you run the VPN server yourself, use the row for the protocol configured on that server.

VPN ports by protocol

VPN type Port or IP protocol What the number is for
L2TP UDP 1701 The initial L2TP request goes to this destination port. L2TP alone provides no encryption.
L2TP/IPsec UDP 500 and 4500 for IPsec, UDP 1701 inside the protection UDP 500 negotiates the connection. UDP 4500 carries NAT traversal traffic. Without UDP encapsulation, the encrypted data can travel as ESP (IP protocol 50).
IKEv2/IPsec UDP 500 and 4500, plus native ESP where applicable IKEv2 negotiates the IPsec connection directly. This VPN type has no L2TP layer and does not require UDP 1701.
PPTP TCP 1723 and GRE (IP protocol 47) TCP handles the control connection. GRE carries the tunneled data. PPTP is a legacy protocol.
OpenVPN Commonly UDP 1194, configurable Match the port and transport in the client profile to the server. OpenVPN Access Server also listens on TCP 443 by default.
WireGuard UDP on the configured listening port UDP 51820 is a common example. Check the actual server port before setting the peer’s endpoint.

VPN server connection and router port setup

Which L2TP/IPsec ports belong on the router?

Think of a connection from a laptop at a hotel to a VPN server at home. The laptop starts by negotiating IPsec. If the connection uses NAT traversal, the home router sees encrypted packets on UDP 4500. The VPN server handles the L2TP traffic after it removes the IPsec protection. A rule that exposes plain UDP 1701 to the internet serves a different purpose and is unnecessary for that protected traffic.

Check the instructions for the device that terminates your VPN. For example, Cisco Meraki’s client VPN guide calls for UDP 500 and 4500 on an upstream router when its VPN appliance sits behind NAT. The L2TP/IPsec specification explains how IPsec protects L2TP.

What to check if the VPN won’t connect

  1. Identify the VPN endpoint. If the VPN runs on your router, use that router’s VPN and firewall settings. If it runs on a separate home server, check that any required forwarding points to the server’s current local address. A DHCP reservation can keep that address stable.
  2. Match the transport as well as the number. A TCP rule for 1194 cannot reach an OpenVPN service listening on UDP 1194. Check your client profile and the server configuration. For WireGuard, compare the peer’s endpoint port with the server’s listening port. See the OpenVPN Access Server defaults and WireGuard’s configuration example.
  3. Check whether your router is reachable. A second router or carrier-grade NAT can prevent an inbound IPv4 connection from reaching a home server. Here’s how to check for CGNAT or a public IP address. Dynamic DNS helps clients find a changing public address. It cannot give the router a public address.
  4. Test with your own VPN client. Try connecting to your server from mobile data with Wi-Fi off. Look for a connection attempt in the server log or a recent WireGuard handshake. If the server reports an authentication error, check the profile and credentials before changing more firewall rules.

Frequently asked questions about VPN ports

Does L2TP use TCP or UDP port 1701?

Use UDP 1701 for the initial L2TP connection. If the profile specifies L2TP/IPsec, the UDP 1701 traffic travels inside IPsec. The L2TP specification describes the UDP transport.

Does IPsec use port 500 or 4500?

It can use both. IKE commonly starts on UDP 500. NAT traversal uses UDP 4500, and an IKEv2 implementation can also switch to 4500 for mobility. Native ESP uses IP protocol 50. See strongSwan’s explanation of NAT traversal.

Do I enter 47 as a port for PPTP?

No. PPTP uses TCP port 1723 and the separate GRE IP protocol, number 47. A rule for TCP or UDP port 47 will not carry GRE. If you are replacing an old PPTP setup, check which modern VPN protocols your server and clients support. Microsoft lists PPTP and GRE separately.

Can a TCP port checker tell me whether WireGuard is working?

No. WireGuard uses UDP. A TCP-only checker cannot test its handshake, even if you enter the correct port number. Use a configured WireGuard peer and check its latest handshake after it tries to send traffic.

Do OpenVPN users need access to the admin web port?

For the VPN tunnel itself, clients need the port in their connection profile. OpenVPN Access Server’s web services commonly use TCP 943. Administrative access can stay restricted to the people who manage the server.