HTTPfy

Port 5060 (SIP)

Session Initiation Protocol signaling for VoIP phones, PBXs (Asterisk, FreePBX) and SIP trunks.

Registered (user) port, 1024-49151 UDPTCP Voice, video and chat Expose only to trusted sources

What port 5060 is used for

Session Initiation Protocol signaling for VoIP phones, PBXs (Asterisk, FreePBX) and SIP trunks.

Security: should port 5060 be open?

Expose only to trusted sources. Exposed SIP servers are scanned non-stop (SIPVicious, friendly-scanner) for weak extension passwords, followed by toll fraud. Allow only your trunk provider and phones, use strong secrets, and prefer 5061 (TLS).

IANA assignment

Service nameProtoDescriptionAssigneeReference
sip TCP SIP - RFC 3263
sip UDP SIP - RFC 3263
sip SCTP SIP - RFC 4168

Registry dates for this port: last modified 2014-04-09.

Check what is listening on port 5060

Linux: is anything listening on TCP 5060?
sudo ss -tlnp 'sport = :5060'
Linux: UDP 5060
sudo ss -ulnp 'sport = :5060'
Linux / macOS: which process owns the port
sudo lsof -nP -i :5060
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':5060 '
Windows (Command Prompt)
netstat -ano | findstr :5060
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 5060 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 5060
From Windows
Test-NetConnection HOST -Port 5060
UDP probe (no reply does not prove it is closed)
nc -vzu -w 5 HOST 5060

Allow only trusted sources on port 5060 in the firewall

Replace 203.0.113.10 with the address or network you trust. With ufw, make sure the default incoming policy is deny.

ufw (one trusted source)
sudo ufw allow from 203.0.113.10 to any port 5060 proto tcp
iptables
sudo iptables -A INPUT -p tcp --dport 5060 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 5060 -j DROP
nftables
sudo nft add rule inet filter input ip saddr 203.0.113.10 tcp dport 5060 accept
sudo nft add rule inet filter input tcp dport 5060 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'TCP 5060 trusted' -Direction Inbound -Protocol TCP -LocalPort 5060 -RemoteAddress 203.0.113.10 -Action Allow
ufw (one trusted source)
sudo ufw allow from 203.0.113.10 to any port 5060 proto udp
iptables
sudo iptables -A INPUT -p udp --dport 5060 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 5060 -j DROP
nftables
sudo nft add rule inet filter input ip saddr 203.0.113.10 udp dport 5060 accept
sudo nft add rule inet filter input udp dport 5060 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'UDP 5060 trusted' -Direction Inbound -Protocol UDP -LocalPort 5060 -RemoteAddress 203.0.113.10 -Action Allow

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.