All posts

Finding a Device You Cannot See: ARP, nmap and Bonjour from a Mac

Updated November 26, 2026

A grid of glowing network nodes with one dim node that a sweeping arc of light reaches toward

The box was powered on, the link lights were blinking, and I had no way to talk to it.

It was a Protectli mini PC that I was turning into my firewall, running OPNsense. The plan was simple: plug it in, open the web interface from my MacBook Pro, start configuring. The problem was the address. I didn't know which IP it had picked up or was sitting on, and a firewall appliance has no screen to tell you.

This is a support problem more than a firewall problem. Someone plugs in a printer, a NAS, a conference room display, a lab instrument, and now nobody can find it. The steps are the same every time, and they work from any Mac without installing much.

Start With What the Device Tells You

Before opening a terminal I turn the device over. Most network gear has a sticker with its MAC address, and a lot of it has a default IP or hostname printed on the label or in the quick start sheet. The MAC address is the one piece of information that stays true no matter what the network did to the device, so I write it down first. Every later step is about matching that MAC address to an IP.

The vendor's documentation is the second place to look. Many appliances ship with a fixed default address on their LAN port and run a DHCP server on it. If that is the case, the device is not lost at all. You just need to be on its network.

Ask Your Own Machine: the ARP Table

Your Mac already keeps a list of every device it has talked to recently on the local network, with the IP and MAC address of each. That list is the ARP cache:

arp -a

Each line pairs an IP with a hardware address. If the MAC from the sticker shows up, you are done. If it doesn't, that only means the Mac hasn't exchanged traffic with the device yet. The ARP cache only holds devices the Mac has recently exchanged packets with.

That leads to the next step: make the Mac talk to everything.

Sweep the Subnet

A ping sweep sends one ping to every address in the subnet. Anything that answers is alive, and as a side effect the ARP cache fills up with every device that replied, including ones that answer ARP but block ping. Here is the shell loop version, using a documentation range as the example:

for ip in $(seq 1 254); do
  ping -c 1 -t 1 192.0.2.$ip | grep "64 bytes" &
done; wait
arp -a

Run arp -a again afterward. The device that did not appear before often appears now.

nmap does the same job better and faster. It is one Homebrew command away:

brew install nmap
sudo nmap -sn 192.0.2.0/24

The -sn flag means host discovery only, no port scan. Run with sudo on the local subnet, nmap uses ARP requests directly, and it prints the MAC address and the vendor it belongs to next to each live host. That vendor column is the fastest way I know to pick one box out of a crowded network: you scan, then look for the manufacturer you expect.

One rule here: only sweep networks you own or have permission to scan. On a corporate network, a scan can trip intrusion detection and generate a ticket with your name on it. Ask the network engineer first.

Listen for Bonjour

Plenty of devices announce themselves. Printers, NAS units, media players and many appliances advertise their services over Bonjour (multicast DNS). macOS has a browser for it built in:

dns-sd -B _services._dns-sd._udp

That lists the service types being advertised on the local link. From there dns-sd -B _http._tcp shows anything offering a web interface, and dns-sd -L resolves a specific instance to a host and port. A firewall appliance usually stays quiet on Bonjour, but for printers and storage this is often the quickest answer. GUI scanners such as LanScan or Fing do the same discovery with a friendlier view, if you prefer clicking.

Shrink the Network

If none of that turns it up, cut the problem down. Disconnect everything except the Mac and the device, ideally with a direct cable or a small unmanaged switch. Now only two hosts are on the wire. Set the Mac's interface to an address in the device's default subnet, or let the device's own DHCP server hand you one, and try again. With nothing else answering, any reply has to come from the device.

This is also where you check the boring things: is the cable in the LAN port or the WAN port? On a firewall that question matters a lot, because the WAN side will be waiting for an upstream DHCP server and the LAN side will be the one serving the web interface.

Wrapping Up

Working through these steps in order turned up the address. None of them is clever on its own. Each one just rules out a possibility and narrows the search for the next.

Once I had the address, the rest was routine: log into the OPNsense web interface, change the default credentials, and start the base configuration. I followed the official OPNsense install manual for that part and kept my own notes as I went.

What I'd Tell Someone Doing This Tomorrow

Work from the outside in. The label gives you the MAC address, which is the one fact you can trust. Your own ARP cache costs nothing to check. A sweep fills that cache. nmap with the vendor column narrows a crowded network to a handful of candidates. Bonjour catches the devices that announce themselves. And when the network is too noisy, take the network away and connect the two machines directly.

Write down what you found when you are done: the MAC address, the IP it ended up with, which port it is plugged into, and the method that found it. The next person looking for that device might be you, six months from now. Better still, give the device a DHCP reservation and a DNS name, so nobody has to go hunting for it again.

About the author

Carlos Mendez

Carlos Mendez

IT support and systems, Maui, Hawaii

I come from IT support and systems work. I build and run my own infrastructure and the production websites for West Maui Tech, my business, and I build AI tooling on top of that stack. I write here about what I run, what broke, and how I fixed it.

Enjoyed this article?

Subscribe to get notified about new posts on software engineering, AI development, and infrastructure.

No spam, unsubscribe anytime.