How to Check Open Ports on a Mac
An open port isn't automatically a problem, most Macs have a handful open for entirely ordinary reasons. The question worth answering is which ones, and whether any belong to something you don't recognize.
List every listening port
sudo lsof -i -P | grep LISTEN LISTEN is the state that means a process is waiting for an incoming connection rather than actively talking to one, which is the definition of an open port. Each row shows the process name, the port number, and whether it's bound to localhost only or to all interfaces.
That last distinction matters more than the port number itself. A service listening on 127.0.0.1 only accepts connections from your own Mac, nothing on the network can reach it. A service listening on 0.0.0.0 or your actual network address is reachable from other devices on the same network, which is a meaningfully different exposure.
What's normal to find
- ControlCenter / rapportd, AirDrop and Handoff discovery.
- sharingd, if File Sharing or Screen Sharing is enabled in System Settings.
- ARDAgent, Remote Management, usually only on managed or developer Macs.
- Spotify, Chrome, or other apps holding a local port for their own internal use, almost always bound to localhost.
None of these are exposure risks by themselves. Most sit behind the macOS application firewall anyway, which by default blocks unsolicited inbound connections to anything not explicitly allowed.
Turning the firewall on, if it isn't already
- System Settings, then Network.
- Click Firewall.
- Toggle it on.
- Click Options to review which apps are allowed to accept incoming connections.
It ships off by default on most consumer Macs, which surprises people. Turning it on blocks unsolicited inbound traffic to anything you haven't explicitly allowed, without touching the outbound connections your own apps make.
What's worth investigating
A port bound to your network address (not localhost), tied to a process name you don't recognize, especially one you didn't knowingly install, is the combination worth digging into. Search the process name before assuming the worst; a lot of legitimate background helpers have names that sound alarming out of context.
See listening ports with a plain-English risk badge, not raw output
CleanMachine's Port Scanner lists every listening port and flags each one Safe, Unknown or Exposed, so you're not cross-referencing process names by hand. Free to scan.
↓ Download Free & Scan