Find All Devices Connected to Local Network using Nmap

Find All Devices Connected to Local Network using Nmap

There might be cases where you want to determine if unwanted users not using your wireless network or to find all devices connected to your network. Nmap is one of the ways to do that. Nmap is a cross-platform tool that allows to scan networks via command line.

To determine which devices are connected to a local network, first we need to get the IP range of the network. On Linux, we can use ip command.

ip addr show
Find IP address on Linux for Nmap

On Windows, we can use ipconfig command.

ipconfig
Find IP address on Windows for Nmap

In our case, subnet mask is 255.255.255.0 = 24 and network IP range is from 192.168.0.0 to 192.168.0.255.

Now we can run the nmap command to find which devices are connected to the local network:

nmap -sn 192.168.0.0/24

On Linux, this command will show only the IP addresses. Execute the command as superuser to include the MAC address of each device as well.

sudo nmap -sn 192.168.0.0/24

The -sn option means that port scanning will be skipped. In previous Nmap releases, -sn was available as the -sP option.

Find All Devices Connected to Local Network using Nmap

Leave a Comment

Cancel reply

Your email address will not be published.