← Mac Change Notes

Why Mac nc Reports UDP Success

A Mac nc -uz success does not prove a UDP service answered. Start with the app’s real operation or a protocol-aware health check. For a service on your own Mac, inspect its UDP socket separately with lsof.

In this article

First decide what needs to work

If a game, discovery service, or other UDP-based app is failing, repeat the smallest supported action that should receive a response. Record the destination and time. A valid reply to that action is more useful than a generic port-test message.

For a service that should be running on your Mac, inspect its expected UDP port. Replace 62079 with the port from that service’s configuration:

/usr/sbin/lsof -nP -iUDP:62079

This reads visible socket information without sending a test packet. Check the owning process and local address; a matching row alone does not establish that the app is healthy or reachable from another computer. No row means the query found no visible match at that moment, subject to process lifetime and access limitations.

The official lsof manual documents the protocol and port selection. Do not add a TCP-only LISTEN or ESTABLISHED state filter to decide whether a UDP service exists. Our UDP state guide explains why those labels answer a different question.

Why the successful message is misleading

The bundled Mac command has a documented caveat. Apple’s netcat manual source warns that UDP scans can report ports as open regardless of the useful result you wanted to establish. The OpenBSD nc manual also explicitly calls out the -uz combination.

OpenBSD’s nc manual displays its CAVEATS section about UDP scan success.

Source: OpenBSD nc manual, captured November 22, 2026. This documents the upstream caveat; the Mac-specific behavior below was measured independently.

UDP does not perform TCP’s connection-establishment handshake. RFC 768 defines its datagram service without a delivery guarantee. Applications can add acknowledgments and their own reliability mechanisms, but an arbitrary probe does not automatically exercise them.

The word “Connection” in a tool’s message is therefore a poor substitute for knowing which protocol, operation, and response were tested. Switching a familiar TCP example to -u does not preserve the same diagnostic meaning.

The same Mac reported success after we closed the socket

On November 22, 2026, we ran a controlled test on macOS 15.7.5, Apple Silicon, using /usr/bin/nc. Everything stayed on IPv4 loopback, 127.0.0.1, inside the test Mac. We did not probe a remote host or alter firewall settings.

A disposable Python receiver bound one UDP socket to an automatically assigned port, 62079. We confirmed its presence with lsof, then ran this exact command three times:

/usr/bin/nc -n -u -z -v -w 1 127.0.0.1 62079

After closing our receiver, we checked that the socket row had disappeared and repeated the identical command three more times.

Controlled stateLocal observationnc result, three attempts
Receiver boundMatching UDP socket visible“succeeded,” exit status 0
Our receiver closedNo matching socket row“succeeded,” exit status 0

All six invocations printed the same success wording. The receiver’s actual state had changed; this command’s success result did not distinguish it.

The port number is a historical detail of this experiment, not a port you should expect to be open today. The test sockets were closed afterward. A different netcat implementation, operating system, address family, or network condition can behave differently; this result is not a universal prediction of every possible failure message.

Zero-I/O wording did not mean zero UDP traffic

The receiver also logged twelve one-byte datagrams during the three bound-state probes, each containing the byte 58 in hexadecimal, the letter X. This is why we do not describe the tested -uz command as a passive inspection or promise that it sends no data.

Those arrivals established that datagrams reached our test receiver. They did not demonstrate a useful application conversation. An unrelated production service might ignore such input because it is not a valid request for its protocol.

We then made a separate application-level exchange. Our client sent the 17-byte message vaultdog-proof-22; the receiver was written to recognize it and return ack-22. The client actually received that reply.

That observation answered a more specific question: our test application handled one recognized request and its response reached the client. It was a stronger result than the generic success message. It still did not test authentication, encryption, throughput, long-term reliability, or any third-party app.

Match the evidence to the question

QuestionUseful evidenceWhat it still leaves open
Is a local process holding this UDP endpoint?A scoped socket inspectionWhether it processes requests
Did my test datagram arrive?Receiver-side observationWhether it was a valid request
Did the expected operation work?A valid application responseOther operations or later failures
Can another device reach the service?A permitted test from that deviceOther networks and paths

For a real service, use its documented diagnostic or normal client operation. If it uses DNS, for example, the meaningful result is an appropriate DNS response to a valid query, not the mere presence of a familiar port number. Avoid substituting random input for a protocol-specific request.

When local operation succeeds but another device fails, record the local bind address, destination, protocol, and source network before changing anything. A socket bound to loopback serves a different scope from one bound to a network interface. Our listener-address guide separates binding from reachability without treating a wildcard address as proof of internet exposure.

For a support report, keep the command, executable path, macOS version, timestamp, and actual app symptom together. Include whether the service was running and what independent response you observed. The refused-versus-timeout guide helps distinguish other failure observations, but neither label should be inferred from this UDP success string.

Treat nc -uz as limited diagnostic evidence. A success line can coexist with a closed local receiver; an actual protocol response is the useful next fact to establish.