The VPN port used depends on the VPN protocol used when initiating a connection to a VPN server. There are multiple protocols used to establish a VPN connection and each of them uses different port numbers. In case you are setting up your own system make sure firewall rules allow connections to the VPN ports listed:
|VPN protocol||VPN port number||Usage|
|OpenVPN (UDP)||1194||OpenVPN connections|
|OpenVPN (TCP)||443||OpenVPN connections|
|PPTP (TCP)||1723||PPTP control path|
|PPTP (GRE)||47||PPTP data path|
|L2TP (UDP)||500, 4500||IKEv1 (IPSec control path)|
|L2TP (ESP)||50||IPSec data path|
|SSTP (TCP)||443||SSTP control and data path|
|IKEv2 (UDP)||500, 4500||IKEv2 (IPSec control path)|
|IKEv2 (ESP)||50||IPSec data path|
|Wireguard (UDP)||51820||Incoming connections|
OpenVPN port numbers are 1194 UDP and 443 TCP for establishing connections.
PPTP ports are 1723 TCP for instantiating a VPN tunnel and IP protocol number 47 – GRE (Generic Routing Encapsulation).
L2TP uses ports 500 and 4500 for negotiating IPSec keys, and IP protocol number 50 – ESP (Encapsulating Security Payload). Within IPSec encryption L2TP uses port 1701 UDP.
SSTP port is 443 TCP for establishing connections.
IKEv2 protocol uses UDP ports 500 and 4500.
Wireguard listening port is 51820 UDP for incoming connections.