brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: nmap -sn lists every device on your network without scanning ports

Nmap
~/tips/nmap-sn

nmap -sn 192.168.1.0/24

Lists the devices that are online on a network without scanning their ports.

Sometimes I only want to know what is on the network right now, not what ports it has open. nmap can do just that part.

nmap -sn 192.168.1.0/24

-sn is a ping scan: it finds the hosts that answer and stops there. Use your own subnet instead of the example range. Run it with sudo on your local network and nmap uses ARP, which also shows the MAC address and the vendor of each device.

Caveat: only scan networks you own or have permission to scan. A device that does not answer pings and ARP, or sits on another VLAN, will not show up.

Further reading: nmap host discovery

More Nmap tips nmap --packet-trace -p 22,80 192.0.2.10 nmap -p 22,80,443 -oG scan.gnmap 192.0.2.0/24 nmap -sV 192.0.2.10 sudo nmap -sU -p 53,67,123,161 192.0.2.10 nmap -sL 192.0.2.0/28 All Nmap tips (12) All topics

Link