What Are Ports?
A port is the number that gets you to one service on a device: the address finds the device, and the port, such as 443 for HTTPS or 22 for SSH, picks the service. A scan reports each port as open (a service accepted the connection), closed (the device answered that nothing listens there) or filtered (no answer at all, usually a firewall). Port Scan in Netutilus for macOS checks a host's TCP ports, and common UDP services if you ask, and names the software that answers on an open port.
Updated
Download on the Mac App Store ↗
free to download · macOS 14.6 or later
An address gets you to a device. A port gets you to one service on it. Ports are numbered 1 to 65535, and each service listens on its own: the same server can run a website on 443 and SSH on 22 at once.
Ports you’ll meet
- 22 SSH, remote login. 3389 Remote Desktop. 5900 Screen Sharing (VNC).
- 53 DNS. 80 HTTP and 443 HTTPS, the web.
- 25, 587 and 993: sending and reading email.
- 445 file sharing (SMB). 631 printing (IPP).
- 5201 iperf3.
TCP and UDP
Most services use TCP: a connection is set up first, and data is checked and resent if lost. UDP just sends, which suits DNS, calls and games, where a late packet is useless anyway. A port number means a different service under each.
Open, closed, filtered
What a scan tells you about a port:
- Open: a service is listening and accepted the connection.
- Closed: the device answered that nothing listens there.
- Filtered: no answer at all, usually a firewall.
- Open|Filtered, for UDP only: silence, which can mean either.
Every open port is a door. Keep the ones you don’t use closed, and never expose remote-access ports to the internet without a VPN or a strong login.
Related
- Port Scan and Path Check.
- LAN Scanner’s Check Services, for a device on your network.
Common ports and what they mean on a Mac
The list above is the short version. The table below covers the ports you are likely to meet on a home network or a developer’s Mac. The full list is IANA’s registry, which splits the numbers into system ports (0–1023), user ports (1024–49151) and dynamic ports (49152–65535).
| Port | Service | TCP/UDP | What it means on a Mac |
|---|---|---|---|
| 22 | SSH | TCP | Remote Login. Closed until you turn it on in System Settings › General › Sharing. |
| 53 | DNS | UDP and TCP | Name lookups. Your Mac sends queries out; TCP carries answers too big for one packet. |
| 67 / 68 | DHCP | UDP | The router hands out addresses on 67; your Mac asks from 68. |
| 80 | HTTP | TCP | Plain web. Nothing in a stock macOS listens here; a local dev server or container might. |
| 123 | NTP | UDP | Time sync, outbound to Apple’s time servers. |
| 443 | HTTPS | TCP, and UDP for QUIC | The web and most Apple services. iCloud Private Relay uses QUIC on UDP 443. |
| 445 | SMB | TCP | File Sharing. Closed until you turn it on. |
| 500 / 4500 | IPsec (IKE, NAT traversal) | UDP | An IPsec VPN: the tunnel is set up on 500 and, behind a NAT, runs on 4500. Apple also lists both for Wi-Fi Calling. |
| 548 | AFP | TCP | Apple Filing Protocol, gone from macOS 27: a Mac on it can no longer reach AFP-only NAS shares or back up to a Time Capsule. SMB replaces it. |
| 587 / 993 | Mail submission / IMAP over TLS | TCP | Sending and fetching mail. Outbound from Mail, not a listener on your Mac. |
| 631 | IPP | TCP | Printing through CUPS. |
| 1900 | SSDP | UDP | UPnP discovery: smart TVs, NAS boxes and routers announcing themselves. |
| 3283 | Apple Remote Desktop | TCP and UDP | Remote Management. Closed until you turn it on in Sharing. |
| 3389 | RDP | TCP and UDP | Microsoft Remote Desktop. Nothing Apple ships listens here. |
| 5000, 7000 | AirPlay Receiver | TCP | ControlCenter listens on both while AirPlay Receiver is on, the most common surprise in a scan of a Mac. Port 5000 in use on a Mac has the fix. |
| 5201 | iperf3 | TCP and UDP | Throughput tests. Something listens only while an iperf3 server runs. |
| 5353 | mDNS (Bonjour) | UDP | How Macs find printers, AirPlay speakers and each other. Always in use. |
| 5432 | PostgreSQL | TCP | A local database: normal on a developer’s Mac, odd on a family one. |
| 5900 | Screen Sharing (VNC) | TCP and UDP | Closed until you turn on Screen Sharing or Remote Management. |
| 8080, 8443 | HTTP and HTTPS alternates | TCP | Dev servers, proxies, admin pages of routers and NAS boxes. |
| 9100 | Raw printing | TCP | A network printer waiting for a job: on the printer, not the Mac. |
| 11434 | Ollama | TCP | A local model server, bound to 127.0.0.1 by default, so only this Mac can reach it. |
| 49152–65535 | Dynamic | TCP and UDP | Short-lived ports for outgoing connections. rapportd, Apple’s Continuity service, also listens on one, and the number changes. |
What a port test can tell you, TCP and UDP
| TCP | UDP | |
|---|---|---|
| Connection | A handshake before any data | None: each packet goes alone |
| A lost packet | Noticed and sent again | Gone |
| What a scan can tell apart | Open, closed, filtered | Open if the service answers, closed if the host sends back “port unreachable”, otherwise open|filtered |
| Typical ports | 22, 443, 445, 5900 | 53, 67/68, 123, 5353 |
With TCP the answer is clear. A closed port sends back a reset within milliseconds, an open one completes the handshake, and a filtered one sends nothing, so from a single test it looks like a slow network. UDP has no handshake, and a UDP service answers only a request it understands. That is why nc -zvu proves nothing on a Mac: it printed “succeeded” for port 9 on 127.0.0.1, where nothing listens.
ICMP, which ping uses, has no ports at all. There is no “ICMP port” to open: a firewall allows or drops ICMP by message type. ICMP and TCP ping explains why a host can ignore ping and still answer on port 443.
Why a connection to a port fails
Work from the inside out. The first check that fails is where the problem is.
1. Is anything listening?
lsof -nP -iTCP:5000 -sTCP:LISTEN
On a Mac with AirPlay Receiver on (columns trimmed, user name shortened):
COMMAND PID USER FD TYPE NODE NAME
ControlCe 661 you 11u IPv4 TCP *:5000 (LISTEN)
ControlCe 661 you 12u IPv6 TCP *:5000 (LISTEN)
No output means none of your own processes holds the port, not that nothing does. Without sudo, lsof lists only your own processes, so services macOS runs as the system, such as Remote Login, stay hidden. This lists every listening TCP port with its process name, the system’s included, and needs no sudo:
netstat -anv -p tcp | grep LISTEN
It writes the port after the address with a dot, as in *.5000 or 127.0.0.1.8021. Both commands only read.
2. Does it listen on the network, or only on this Mac?
The NAME column says. *:5000 means every interface. 127.0.0.1:11434 means loopback only: no other device can reach it, whatever the firewall says. Compare the two addresses with nc; -G 2 gives up after two seconds.
ipconfig getifaddr en0
nc -zv -G 2 127.0.0.1 11434
nc -zv -G 2 192.168.110.74 11434
On our test Mac, Ollama answered on 127.0.0.1 and refused on the network address:
192.168.110.74
Connection to 127.0.0.1 port 11434 [tcp/*] succeeded!
nc: connectx to 192.168.110.74 port 11434 (tcp) failed: Connection refused
| What nc says | What it means |
|---|---|
| Succeeded on 127.0.0.1, refused on the network address | The service listens on loopback only. Change its bind address, not the firewall. |
| Succeeded on both | It listens on the network. If another device still can’t connect, go on to step 3. |
| Refused on both | Nothing listens. Back to step 1. |
3. Is the macOS firewall in the way?
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
Firewall is disabled. (State = 0)
State 0 means the built-in firewall is off and is not the problem; a third-party firewall, if you installed one, has its own settings. When it is on, macOS decides incoming connections app by app, not port by port: check that the app is allowed in System Settings › Network › Firewall › Options, where “Block all incoming connections” shuts out every app and sharing service, leaving only basic ones such as DHCP and Bonjour. The firewall does not filter outgoing traffic.
4. Is the router or the provider blocking it?
If the port answers from another device on your network but not from outside, the block is past your Mac: a missing port-forwarding rule on the router, or the provider. The router’s address:
route -n get default | grep gateway
gateway: 192.168.110.1
Test from outside your network, such as a phone on mobile data instead of your Wi-Fi. Many providers block port 25, many also block 445 (Xfinity’s list has both), and some block incoming 80 on home lines; your provider’s own documentation says which. If the router’s WAN address falls in 100.64.0.0/10, you are behind carrier-grade NAT, and no port-forwarding rule on your router can open a port to the internet.
Tested on macOS 27.0.1 on 30 October 2026.
To check the ports of another device without Terminal, Port Scan takes a range or a list, such as 22,80,443,8000-8100, names the software that answers on an open port with Detect services, and probes ten common UDP services with Also UDP.
Questions about ports
Is an open port dangerous? Not by itself. What matters is what owns it, who can reach it, and whether it needs to be reachable. A port bound to 127.0.0.1 is reachable only from the Mac itself. Ports that hand out logins, such as 22, 3283 and 5900, are the ones worth checking.
Which ports does a Mac listen on out of the box? It depends on what is turned on. On our test Mac, netstat -anv -p tcp | grep LISTEN showed two of Apple’s own processes listening on the network: ControlCenter on TCP 5000 and 7000 (AirPlay Receiver) and rapportd on one high port. Bonjour uses UDP 5353 on every Mac. Ports 22 and 445 stay closed until you turn on Remote Login or File Sharing, and 5900 until you turn on Screen Sharing or Remote Management.
How do I close a port on a Mac? Stop whatever owns it. Remote Login, File Sharing, Screen Sharing and Remote Management are switches in System Settings › General › Sharing. For AirPlay Receiver, see Port 5000 in use on a Mac. Anything you started yourself, quit. Then run netstat -anv -p tcp | grep LISTEN again: if the port is not in the list, nothing listens. Without sudo, lsof can’t see the Sharing services, which run as the system, so its silence proves nothing for them. The firewall can stop other devices from reaching an app; the port itself stays open.
Sources
- IANA Service Name and Transport Protocol Port Number Registry: the full port list and the three ranges.
- Apple: TCP and UDP ports used by Apple software products: Apple’s own list, including Screen Sharing on 5900 and Private Relay on UDP 443.
- Apple: Backup disks you can use with Time Machine: AFP ends with macOS 27.
- Xfinity: list of blocked ports: one provider’s own list, with 25 and 445.
- RFC 6762, Multicast DNS: why Bonjour sits on UDP 5353.
- RFC 6598, Shared Address Space: 100.64.0.0/10, the range used for carrier-grade NAT.
- Ollama FAQ: 11434, bound to 127.0.0.1 by default.
man nc,man lsofandman netstaton macOS:-z,-v,-G,-sTCP:LISTENand-anv.
Run it on your own network
Netutilus puts every network tool in one app. Free to download; Pro is a one-time purchase, never a subscription.
Articles
See also
- Port ScanChecks which ports on a host accept connections, and which software answers on them.
- Path CheckShows how your Mac reaches the network, and whether a host answers on the ports you need.
- ICMP and TCP PingTwo ways to time a host, and why one may answer when the other doesn't.
- Who Is on My Network?List every device on your network, find out what each one is, and get notified when a new one joins.
- LAN ScannerFinds the devices on your network, works out what they are, and can tell you when a new one joins.