Port 51820: WireGuard

Port 51820 (UDP) is used by WireGuard. Conventional WireGuard VPN listen port (configurable).

51820Port
UDPProtocol
—IANA service name
VPN & proxyCategory

Port range

51820 is a dynamic / private port (range 49152–65535). This range is meant for ephemeral client ports, so a fixed service here may collide with outgoing connections.

Security

Only open port 51820 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 51820 in a firewall

ufw         sudo ufw allow 51820/udp
iptables    sudo iptables -A INPUT -p udp --dport 51820 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=51820/udp
Windows     New-NetFirewallRule -DisplayName "WireGuard 51820" -Direction Inbound -Protocol UDP -LocalPort 51820 -Action Allow

Check if port 51820 is open

nc -vzu example.com 51820   # UDP checks are unreliable: no reply ≠ closed
sudo ss -tulpn | grep ':51820 '   # what is listening locally (Linux)

Other vpn & proxy ports

Frequently asked questions

What is port 51820 used for?
WireGuard. Conventional WireGuard VPN listen port (configurable).
Is port 51820 TCP or UDP?
UDP.