Port Scanner for Mac (2026): Built-In Options and When to Use an App

By Paul Snyman · Published · 6 min read

Short version. Unlike an iPhone, a Mac can do this properly. nc is already installed for quick checks, nmap via Homebrew gives you SYN scans, UDP and OS detection, and a GUI app is worth it when you want scanning tied to a device list you are already watching. Scan only equipment you own or administer.

The Mac is a full Unix system, so unlike iOS there is no platform restriction here. The question is which tool fits the job.

Full disclosure: I build PingKit Agent, so weigh the recommendation accordingly. The limits section is not padding, and there is a whole category of Mac network tool below that PingKit deliberately is not.

What You Already Have

netcat ships with macOS. To check a single port:

nc -zv 192.168.1.50 22

Or a range:

nc -zv 192.168.1.50 1-1024

Fast, no install, fine for "is this service up". No service identification and TCP only in practice.

lsof shows what is listening on your own Mac:

sudo lsof -iTCP -sTCP:LISTEN -n -P

This is the right tool when the question is "what is my own machine exposing", which is a different question from scanning another host.

When to Install nmap

brew install nmap. Worth it when you need what only raw sockets provide:

Note that SYN scans and OS detection need sudo, because raw sockets require privileges. This is precisely the capability iOS never grants, which is why nmap cannot exist on an iPhone.

When a GUI App Is Worth It

Not for raw capability, since nmap wins on that comfortably. It is worth it when scanning is part of something continuous: you are already watching a device list, and you want to check a device without leaving the context or looking up its address.

PingKit Agent includes a TCP port scanner alongside its device list, so you can go from "what is this unfamiliar device" to "what is it running" directly. It also profiles ports as part of identifying devices, which is one of the signals it uses to work out what something is.

NeedTool
Check one port quicklync -zv
What is my own Mac listening on?lsof
UDP, OS detection, scriptingnmap
Scan a device from a list you watchA monitoring app
Continuous change detectionA monitoring app

Scope matters. Scanning equipment you own or administer is ordinary diagnostic work. Scanning hosts and networks you do not have permission to test is a different matter and may be unlawful where you live. PingKit is built for the first case: your own network and devices you own.

Honest Limits of the App

Frequently Asked Questions

Does macOS have a built-in port scanner?

netcat (nc) is included and handles single ports or ranges, for example nc -zv 192.168.1.50 1-1024. For what your own Mac is listening on, use sudo lsof -iTCP -sTCP:LISTEN -n -P. Neither identifies services in detail.

How do I install nmap on a Mac?

brew install nmap using Homebrew. SYN scans and OS detection require sudo because raw sockets need privileges, which is the same capability iOS never grants to apps.

What is the difference between nc and nmap?

netcat opens ordinary TCP connections, which answers whether a port accepts a connection. nmap can craft raw packets, enabling SYN scans, UDP scanning, OS fingerprinting and its scripting engine. nmap is far more capable and needs privileges for most of it.

Is port scanning legal?

Scanning equipment you own or administer is normal diagnostic work. Scanning hosts or networks you have no permission to test may be unlawful depending on where you are. Keep it to your own network.

Can I scan ports from an iPhone instead?

Only TCP connect scans. iOS does not grant raw socket access to apps, so SYN scanning, UDP scanning and OS detection are impossible there. A Mac has no such restriction.

Scanning tied to the devices you are watching

A TCP port scanner next to a continuously updated device list, with alerts when a device changes what it advertises. macOS 15 or later.

Get PingKit Agent for Mac

Related Articles