Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Port Scanner Mac Network Utility: How to Use It

· 4 min read · Home Networking

In this article
  1. Background: What a Port Scanner Does
  2. How to Use Network Utility’s Port Scanner
  3. Using the Command Line: netcat and nmap
  4. Choosing the Right Tool
  5. Common Problems and Misconceptions
  6. Safety and Ethical Considerations
  7. Alternatives to Network Utility
  8. Frequently Asked Questions

Yes, macOS includes a built-in port scanner in the Network Utility app (located at /System/Library/CoreServices/Applications/), and you can also use the command-line tool nc (netcat) for more control. This article explains how to use both, what results mean, and when you might need a third-party scanner.

Background: What a Port Scanner Does

A port scanner checks a remote or local computer for open network ports. Every internet-connected device has 65,535 TCP and 65,535 UDP ports, and services like web servers (port 80/443), email (25/587), and file sharing (445) listen on specific ones. Scanning reveals which services are exposed, which is useful for:

  • Diagnosing why a connection fails (e.g., a firewall blocking a port).
  • Checking your own Mac for unintended open ports.
  • Verifying that a server is running the expected service.

Network Utility’s scanner is basic but sufficient for simple checks. For advanced scanning, most users turn to nmap (install via Homebrew).

How to Use Network Utility’s Port Scanner

The Network Utility app is hidden in modern macOS versions (Catalina and later). To open it:

  1. Open Finder and press Cmd+Shift+G.
  2. Type /System/Library/CoreServices/Applications/ and press Enter.
  3. Double-click Network Utility.
  4. Click the Port Scan tab.
  5. Enter an IP address or hostname (e.g., 192.168.1.1 or example.com).
  6. Set the port range (default is 1-1024).
  7. Click Scan.

The results show a list of open ports and the service name it recognizes (e.g., 80 http, 443 https). If no ports are open, the app may show “Port scan has completed” with an empty list—that means the target is not responding on those ports.

Using the Command Line: netcat and nmap

The Terminal offers more flexibility. To test a single port with netcat (preinstalled on macOS):

  1. Open Terminal (Finder > Applications > Utilities > Terminal).
  2. Run: nc -vz example.com 80 (replace with your target and port).
  3. Output like Connection to example.com port 80 succeeded! means the port is open.

For a range scan, install nmap via Homebrew (brew install nmap) and run:

nmap -p 1-1024 192.168.1.1

Nmap gives a detailed report, including service versions and OS detection (with proper permissions). It is the standard tool for network professionals.

Choosing the Right Tool

Your choice depends on the task:

  • Quick single-port check: Use nc—no installation needed.
  • Simple range scan on your LAN: Network Utility is fine, but it lacks timing and stealth options.
  • Comprehensive scanning (firewall rules, service detection): Use nmap. It supports scripts, timing profiles, and output formats.
  • Scanning many hosts: nmap can scan an entire subnet (e.g., 192.168.1.0/24).

Network Utility is deprecated and not updated for newer macOS features, but it still works. For scripting or automation, command-line tools are better.

Common Problems and Misconceptions

“Why does my scan show no open ports?” The target may be offline, firewalled, or the service is on a non-standard port. Also, UDP ports are not shown by Network Utility—it only scans TCP.

“Is port scanning illegal?” Scanning a system you own or have permission to test is legal. Scanning someone else’s network without consent may violate laws in many jurisdictions. Always get written authorization.

“Why does Network Utility not work on macOS Monterey?” It still exists but is hidden. If it fails, use Terminal—Apple has not updated the app since macOS 10.14, and some features may break on newer systems.

“What is the difference between TCP and UDP scans?” TCP scans establish a handshake; UDP scans send packets and wait for responses. UDP is slower and less reliable, which is why most scanners default to TCP.

Safety and Ethical Considerations

Port scanning can be seen as hostile. Before scanning:

  • Only scan systems you own or have explicit permission to test.
  • Use scanning on your own network to learn, but be aware that your ISP may flag unusual activity.
  • Do not use scanning to bypass security controls—that is illegal.

On your own Mac, you can check for open ports with lsof -i -P | grep LISTEN to see what services are listening. This is a safe, local diagnostic.

Alternatives to Network Utility

Besides nmap, other GUI tools exist:

  • LanScan (App Store) – simple LAN scanner that shows open ports.
  • Angry IP Scanner – cross-platform, scans IP ranges and ports.
  • Zenmap – official GUI for nmap (requires nmap installed).

These are not built-in, but they offer more user-friendly interfaces. For most users, the built-in tools are enough.

Frequently Asked Questions

Q: How do I open Network Utility on macOS Ventura or Sonoma?
Use the Finder path above. Alternatively, open Terminal and type open /System/Library/CoreServices/Applications/Network Utility.app.

Q: What port range should I scan?
For a quick check, scan 1-1024 (well-known ports). For a thorough scan, use 1-65535, but it takes longer and may trigger alarms.

Q: Can I scan my own Mac for open ports?
Yes. Use lsof -i -P | grep LISTEN to list listening ports, or scan 127.0.0.1 with nmap.

Q: Why does Network Utility show “Connection refused” for some ports?
That means the port is closed or filtered—no service is listening, or a firewall is dropping packets.

Q: Is there a way to scan UDP ports on Mac?
Network Utility does not support UDP. Use nmap with -sU flag, but note that UDP scans are slow and often unreliable.