CyberHunter
Local dataset, no network
// VPN, tunnels & proxies

Port 51820: WireGuard

Default port of WireGuard VPN tunnels.

51820

How WireGuard works

VPN, tunnels & proxies
yougateway yougateway

Traffic is wrapped in a tunnel between the two ends, so the network in between only sees the tunnel. Everything is encrypted: someone on the path only sees unreadable bytes.

Transport
UDP
Exposure risk
2/10 low if reachable from the Internet
Encryption
EncryptedTLS or built-in crypto
IANA status
Unassignedcommon use differs from the registry
Range
Dynamic (49152-65535)
01 Security

Is port 51820 dangerous?

Common attacks and weaknesses

  • Stolen private keys give network access (no second factor in the protocol).

How to secure it

  • Protect and rotate keys; restrict AllowedIPs per peer.

Unofficial use. The IANA assignment below differs from what is usually found on this port in practice.

02 Registry

IANA registry entries for port 51820

No entry. The port is free for any application, so check what uses it on your hosts.

// source: IANA service name and port number registry

03 Check it

Which program uses port 51820, and is it reachable?

Linux

sudo ss -ltnup 'sport = :51820'      # process listening on 51820
sudo lsof -nP -i :51820

macOS

sudo lsof -nP -i :51820

Windows (PowerShell)

Get-NetTCPConnection -LocalPort 51820 -State Listen | Select LocalAddress, OwningProcess
Get-NetUDPEndpoint -LocalPort 51820
netstat -ano | findstr :51820

From another machine

nmap -p 51820 -sV <host>
sudo nmap -sU -p 51820 <host>
nc -zv <host> 51820

Block it in the firewall

sudo ufw deny 51820/udp                                         # Linux (ufw)
New-NetFirewallRule -DisplayName "Block 51820" -Direction Inbound -LocalPort 51820 -Protocol UDP -Action Block  # Windows
04 FAQ
What is port 51820 used for?

Default port of WireGuard VPN tunnels.

Is port 51820 TCP or UDP?

Port 51820 is registered for UDP.

Is it safe to open port 51820?

It is rated 2/10 (low) when exposed to the Internet. Stolen private keys give network access (no second factor in the protocol). Protect and rotate keys; restrict AllowedIPs per peer.

How do I check if port 51820 is open?

On Linux run "ss -ltnup 'sport = :51820'", on macOS "lsof -nP -i :51820", and on Windows "netstat -ano | findstr :51820" to see the local process. From another machine, "nmap -p 51820 <host>" shows whether it is reachable.

05 Related

Latest vulnerability news

All news