Port 5060 is SIP, the signalling protocol for VoIP calls. SIP over TLS uses 5061, and the audio itself travels over RTP on a separate UDP range. It should not be reachable from the public internet.
- Port
- 5060
- Protocol
- UDP and TCP
- Service
- SIP
- Expose to internet?
- No
- Also used by
- Asterisk, FreeSWITCH, FreePBX, 3CX, VoIP phones
Is port 5060 safe to open?
Exposed SIP servers are scanned constantly by tools that guess extension passwords. A compromised extension is used for toll fraud, placing expensive international calls that can cost thousands before anyone notices.
How to secure SIP
- Allow 5060/5061 only from your SIP trunk provider and known remote phones.
- Use long random passwords for every extension.
- Run fail2ban with the Asterisk or FreeSWITCH filter.
- Restrict outbound calling (international routes, call limits) at the PBX and with your provider.
- Prefer SIP over TLS (5061) with SRTP.
Check if port 5060 is open
Linux: what is listening on this port
sudo ss -tulpn | grep ':5060 'Windows (PowerShell): what is listening
Get-NetTCPConnection -LocalPort 5060 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}From another machine: is it reachable
nc -zv HOST 5060
# or
nmap -p 5060 HOST
# Windows
Test-NetConnection HOST -Port 5060Restrict port 5060 in the firewall
Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:5060:5060) instead of relying on the host firewall.
ufw: allow only your private network, deny everyone else
sudo ufw allow from 10.0.0.0/8 to any port 5060 proto udp
sudo ufw deny 5060/udpfirewalld: allow one source network only
sudo firewall-cmd --permanent --remove-port=5060/udp
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="5060" protocol="udp" accept'
sudo firewall-cmd --reloadiptables
sudo iptables -A INPUT -p udp --dport 5060 -s 10.0.0.0/8 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 5060 -j DROPWindows Firewall (PowerShell, as Administrator)
New-NetFirewallRule -DisplayName "Block 5060 from internet" -Direction Inbound -Protocol UDP -LocalPort 5060 -RemoteAddress Internet -Action BlockMonitor port 5060
Run a TCP port monitor against your public IP on port 5060: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.
Related ports
FAQ
What is port 5060 used for?
Port 5060 is SIP, the signalling protocol for VoIP calls. SIP over TLS uses 5061, and the audio itself travels over RTP on a separate UDP range. It is also used by Asterisk, FreeSWITCH, FreePBX, 3CX, VoIP phones.
Is it safe to open port 5060?
Not to the public internet. Exposed SIP servers are scanned constantly by tools that guess extension passwords. A compromised extension is used for toll fraud, placing expensive international calls that can cost thousands before anyone notices.
Is port 5060 TCP or UDP?
SIP uses UDP and TCP on port 5060.
How do I check if port 5060 is open?
On the server, run sudo ss -tulpn | grep ':5060 ' (Linux) or Get-NetTCPConnection -LocalPort 5060 (Windows) to see what is listening. From another machine, run nc -zv HOST 5060 or Test-NetConnection HOST -Port 5060.
Know the moment a port stops answering.
TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.