Is port 5060 (SIP) exposed to the internet, and does it invite toll fraud?
Port 5060 is the default SIP port for VoIP signalling over UDP and TCP, and an internet-facing PBX on it gets scanned for weak extension passwords that let strangers place calls you pay for. AdminKit's port check does not test 5060, so this guide shows how to test your own system and restrict it.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- Port 5060 carries SIP signalling for VoIP over UDP and TCP; 5061 is SIP over TLS. Most PBXs, VoIP gateways and desk phones speak it.
- An open 5060 is scanned constantly for extensions with weak passwords. A guessed password lets a stranger place calls through your PBX, and you pay for them.
- AdminKit’s port check does not test 5060, and it probes TCP only. Test SIP manually with an
OPTIONSrequest from outside your network. - Limit 5060 to your SIP provider’s addresses and your own phones, use a VPN for remote phones, keep outbound call routes behind authentication, and rate-limit failed logins.
What runs on port 5060?
SIP, the Session Initiation Protocol, sets up, changes and ends calls. The voice itself travels separately over RTP, usually on a range of UDP ports. RFC 3261, the SIP specification, fixes the defaults in §18.1.1: port 5060 for UDP, TCP and SCTP, and 5061 for TLS. IANA’s port registry lists the same assignments under the service names sip and sips.
The devices that listen on 5060 range from a cloud PBX to a single office phone:
| Device | Why it listens on SIP |
|---|---|
| IP PBX (Asterisk, FreePBX and other platforms) | Registers office phones and takes calls from SIP trunk providers |
| VoIP gateway or session border controller | Connects SIP to a phone line or separates internal and external SIP |
| Router or modem with built-in phone ports | Provides the ISP’s voice service to analogue phones |
| Desk phone or analogue telephone adapter | Receives incoming calls from the PBX or provider |
A SRV record such as _sip._udp.example.com can point clients at another port, but most equipment uses 5060 unless someone changes it.
Why is SIP designed to face the internet?
Unlike most services in this series, SIP was designed to be reachable. RFC 3261 §18.2.1 recommends that a server listen on the default SIP ports “on all public interfaces”, and its security section, §26.1, states that “it is anticipated that SIP will frequently be used on the public Internet.” A SIP provider has to accept requests from anywhere, and an internet telephony service could not work otherwise.
That is why “is 5060 open?” has a less obvious answer than for Telnet or Redis. The useful question is who can reach it. A provider’s edge server needs to answer the world. A small office PBX usually needs to answer two groups: the provider’s trunk servers and its own phones. Anything wider is attack surface with no business purpose.
Why is an exposed SIP port a target?
RFC 3261 §26.1 describes the classic threats. Attackers “may wish to steal services, eavesdrop on communications, or disrupt sessions.” It lists registration hijacking, where a forged REGISTER redirects a user’s calls to the attacker’s device, and denial of service, including the use of SIP elements to amplify traffic towards a victim.
For an operator, the most expensive threat is theft of service, usually called toll fraud. The Asterisk project’s security considerations open with a warning: “Improper configuration of Asterisk could allow unauthorized use of your facilities, potentially incurring substantial charges.” The calls are placed through your trunk, so your provider bills you, often for international or premium-rate destinations chosen because they cost the most.
The scanning is automatic. Kamailio’s security notes say that “the moment you put a machine on the Internet, it will be scanned”, and that a scanner calling itself “friendly-scanner” will soon flood it. They describe three kinds of attack:
- Guessing usernames and passwords. A SIP server can handle many requests per second, so it is worth an attacker’s time to try credentials for extensions that can call out. Users who choose their own passwords pick weak ones.
- Guessing prefixes. Some configurations route numbers differently based on a dial prefix, and attackers probe for prefixes that skip the normal checks.
- Denial of service. Every request costs processing time, and requests that trigger a credential lookup cost more.
How do attackers get from an open port to free calls?
Two configuration mistakes do most of the damage, and both are covered in vendor hardening guidance.
The first is a weak extension secret. SIP uses digest authentication (RFC 3261 §22), which never sends the password itself but does nothing against a guessable one. An extension number is often a short, predictable number, so the scanner only has to guess the secret. Once registered, the attacker’s software is just another phone on your PBX.
The second is a dialplan that lets unauthenticated calls reach outbound routes. Asterisk’s dialplan security page puts it first: use extension contexts to isolate outgoing or toll services from incoming connections, because any channel that can enter a context can reach every extension in it. It adds: “never ever put outgoing toll services in the ‘default’ context.” A PBX that accepts anonymous incoming SIP into a context that can dial out needs no password at all.
How do you check your own exposure?
AdminKit’s open ports check tests nine TCP ports on the public IP you connect from. Port 5060 is not on the list, and the tool does not send UDP, where most SIP traffic runs. Confirm your public address with what is my IP, then test from a machine outside your network.
The most informative test is an OPTIONS request. RFC 3261 §11 defines OPTIONS as a way to ask a server about its capabilities without placing a call. Over TCP, §18.2.2 says the server answers on the same connection, which makes the test easy. The Via host below is a placeholder; leave it as it is:
printf 'OPTIONS sip:203.0.113.5 SIP/2.0\r\nVia: SIP/2.0/TCP test.invalid;branch=z9hG4bK-akcheck1\r\nMax-Forwards: 70\r\nFrom: <sip:check@test.invalid>;tag=ak1\r\nTo: <sip:203.0.113.5>\r\nCall-ID: akcheck1@test.invalid\r\nCSeq: 1 OPTIONS\r\nContent-Length: 0\r\n\r\n' | nc -w 3 203.0.113.5 5060
For UDP, send the same request with SIP/2.0/UDP in the Via line, add ;rport after the branch parameter and use nc -u. The rport parameter, defined in RFC 3581, asks the server to reply to the address and port the request actually came from, which is what makes a reply reach you through NAT. The address 203.0.113.5 is from the documentation range; use your own, and only test hosts you own or are authorized to test.
| Reply | What it means |
|---|---|
SIP/2.0 200 OK, often with a Server: or User-Agent: line | SIP answers anyone, and the header may name the PBX software and version. |
SIP/2.0 401 Unauthorized or 407 Proxy Authentication Required | The server asks for credentials. It is still reachable, so password strength and rate limits matter. |
SIP/2.0 403 Forbidden or 404 Not Found | The server is reachable but refuses this request. Still worth restricting by source address. |
| No reply over UDP or TCP | Nothing answered from where you tested. UDP silence is not proof; check the device itself too. |
RFC 3261 §18.2.1 says a server that listens for UDP must listen on the same port for TCP, but some UDP-only deployments ignore that rule, so run both tests.
How do you confirm the listener on your own host?
On a Linux PBX, list the SIP sockets and the addresses they are bound to:
$ sudo ss -lunp 'sport = :5060'; sudo ss -ltnp 'sport = :5060'
UNCONN 0 0 0.0.0.0:5060 0.0.0.0:* users:(("asterisk",pid=1204,fd=21))
This example shows UDP 5060 bound to every interface and no TCP listener. Then check what can reach it: the host firewall, any cloud security group, and any port forwarding rule on the router in front of it. A router or modem with built-in phone ports may also answer SIP itself; its admin page usually shows whether the voice service accepts SIP from any address or only from the provider.
How do you fix an exposed SIP port?
- Restrict by source address. Allow 5060 and 5061 only from your SIP trunk provider’s published signalling addresses and your own networks. Asterisk’s network security page points to the
permitanddenyaccess lists in its channel configuration for the same purpose. - Put remote phones on a VPN. A home-working phone that connects through a VPN never needs SIP open to the world.
- Use strong, unique secrets for every extension. Generate them; do not let users choose them, and do not reuse the extension number in the password.
- Keep outbound routes behind authentication. Follow Asterisk’s dialplan advice: separate contexts for incoming calls and toll services, and nothing that dials out in the
defaultcontext. - Rate-limit and ban. Kamailio’s notes describe its
pikemodule, which tracks requests per source address, and banning sources that fail authentication repeatedly with fail2ban. The same approach works with any platform that logs failed logins. - Encrypt where you can. Asterisk’s SIP channel supports TLS for signalling and SRTP for media, which protects credentials and calls in transit.
- Ask your provider about call limits. Find out whether your SIP provider can block destinations you never call or cap spending, which limits the damage if an account is compromised.
NIST SP 800-58, NIST’s VoIP security guide, dates from 2005, but its first recommendations still apply: separate voice and data onto logically different networks where feasible, block SIP from the data network at the voice gateway, and use strong authentication and access control on the gateway as on any critical component.
Does the same question apply to other remote access ports?
SIP shares a pattern with RDP on port 3389 and SSH on port 22: a service that has to accept logins, exposed to a constant stream of password guesses. The fixes are the same family: limit who can connect, make credentials impossible to guess, and slow down or ban repeated failures. To work through every exposed service on a network in one pass, see using the port check to inventory IoT device exposure.
Which servers may you test with these checks?
Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control. AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.
This guide is part of AdminKit’s machine protocols cluster, which covers device and telephony protocols that are only safe when their exposure is deliberate.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Is it normal for port 5060 to be open?
Sometimes. RFC 3261 was written for SIP on the public internet, and a SIP provider's servers or a PBX that takes calls from a trunk provider need some reachable signalling port. What is not normal is a PBX or phone that answers SIP from any address in the world when it only needs to talk to one provider and your own phones.
What is SIP toll fraud?
Someone uses your PBX to place calls, usually to premium-rate or international numbers, and the charges land on your bill. The Asterisk project's own documentation warns that improper configuration could allow unauthorized use of your facilities, potentially incurring substantial charges. The usual ways in are a guessed extension password or a dialplan that lets unauthenticated callers reach outbound trunks.
Why does my PBX log thousands of failed registrations?
Automated scanners. Kamailio's security documentation says that the moment you put a machine on the internet it will be scanned, and describes three kinds of attack it sees: guessing usernames and passwords, guessing dial prefixes that route differently, and floods that waste processing. Failed REGISTER attempts from unknown addresses are the first kind.
Does AdminKit's port check scan port 5060?
No. The port check tests a fixed list of nine TCP ports (23, 554, 1883, 8883, 502, 7547, 80, 443, 8080) on the public IP you connect from, and it does not probe UDP, which is where most SIP traffic runs. Use the manual SIP OPTIONS test in this guide from outside your network.
Does moving SIP to a different port fix it?
It reduces noise from scanners that only try 5060, but it is not access control. Anyone who scans more ports can still find the service. Restrict who can reach the port and make every account hard to guess; a different port number is at most a small extra layer.
What about port 5061?
Port 5061 is SIP over TLS (SIPS). It encrypts signalling, which protects passwords and call details on the wire, but it does not stop password guessing or toll fraud by itself. The same firewall and account rules apply to 5061.
Sources
- RFC 3261 — SIP: Session Initiation Protocol (§11, §18.1.1, §18.2.1, §18.2.2, §26.1)
- RFC 3581 — An Extension to SIP for Symmetric Response Routing (rport)
- IANA Service Name and Transport Protocol Port Number Registry (5060 sip, 5061 sips)
- Asterisk Documentation — Important Security Considerations
- Asterisk Documentation — Dialplan Security
- Asterisk Documentation — Network Security
- Kamailio Wiki — Overview of security related config snippets
- NIST SP 800-58 — Security Considerations for Voice Over IP Systems (2005)
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.