UDP port 500 is IKE, the key exchange used to set up IPsec VPN tunnels. When either side is behind NAT, IPsec moves to UDP 4500. It is normally meant to be reachable from the internet.
- Port
- 500
- Protocol
- UDP
- Service
- IKE (IPsec VPN)
- Expose to internet?
- Yes, usually
- Also used by
- strongSwan, Libreswan, Windows RRAS, site-to-site VPN appliances
Is port 500 safe to open?
A VPN gateway has to be reachable on UDP 500 (and 4500), so exposure is expected. The risk lies in weak configuration: IKEv1 aggressive mode with a pre-shared key can expose a hash that can be cracked offline. VPN appliances are also frequent targets when their firmware is out of date.
How to secure IKE (IPsec VPN)
- Use IKEv2 rather than IKEv1, and avoid aggressive mode.
- Use certificates or long random pre-shared keys.
- Restrict peers to known IP addresses for site-to-site tunnels.
- Keep VPN appliance firmware patched.
Check if port 500 is open
Linux: what is listening on this port
sudo ss -ulpn | grep ':500 'Windows (PowerShell): what is listening
Get-NetUDPEndpoint -LocalPort 500From another machine: is it reachable
sudo nmap -sU -p 500 HOSTOpen port 500 in the firewall
ufw (Ubuntu, Debian)
sudo ufw allow 500/udpfirewalld (RHEL, Rocky, Alma, Fedora)
sudo firewall-cmd --permanent --add-port=500/udp
sudo firewall-cmd --reloadWindows Firewall (PowerShell, as Administrator)
New-NetFirewallRule -DisplayName "Allow 500/UDP" -Direction Inbound -Protocol UDP -LocalPort 500 -Action AllowMonitor port 500
Add a TCP port monitor for 500 and Statance connects to it from up to six regions, alerting you by email, Slack, Discord or PagerDuty when IKE (IPsec VPN) stops answering. TCP port monitoring.
Related ports
| Port 1194 | OpenVPN | Low risk |
| Port 51820 | WireGuard | Low risk |
FAQ
What is port 500 used for?
UDP port 500 is IKE, the key exchange used to set up IPsec VPN tunnels. When either side is behind NAT, IPsec moves to UDP 4500. It is also used by strongSwan, Libreswan, Windows RRAS, site-to-site VPN appliances.
Is it safe to open port 500?
Usually, yes. A VPN gateway has to be reachable on UDP 500 (and 4500), so exposure is expected. The risk lies in weak configuration: IKEv1 aggressive mode with a pre-shared key can expose a hash that can be cracked offline. VPN appliances are also frequent targets when their firmware is out of date.
Is port 500 TCP or UDP?
IKE (IPsec VPN) uses UDP on port 500.
How do I check if port 500 is open?
On the server, run sudo ss -tulpn | grep ':500 ' (Linux) or Get-NetTCPConnection -LocalPort 500 (Windows) to see what is listening. From another machine, run nc -zv HOST 500 or Test-NetConnection HOST -Port 500.
Know the moment a port stops answering.
TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.