How to find devices connected to your network using Debian Linux

s2 0

Sometimes you need to find out what devices are connected to your network. There can be several reasons for this. Your internet may be running slower than usual, you may notice suspicious activity suggesting someone is stealing your WiFi, or you may be troubleshooting a problem. Whatever the reason, it’s a good idea to double-check who else is on your network so that appropriate action can be taken.

Nmap is a great tool that can be used to find devices connected to your network. It’s an open source network exploration tool that tells you what other systems are on your network, along with their IP addresses, what services they are providing, what version of the operating system they are running, and much more. It runs on almost all major operating systems including Linux, Windows, and Mac OS.

In this article, we describe how to install and use Nmap to find devices connected to your internet.

We will use Debian10 to describe the procedure mentioned in this article. You can use the same procedure for older versions of Debian.

Step 1: Open the Debian Terminal

Start the Terminal application on your system by going into the activities Tab in the top left corner of your Debian desktop. Then type in the search bar terminal. When the terminal icon appears, click on it to launch it.

Step 2: Install the Nmap network scan tool

Now run the following command as sudo in the terminal application to install the network scan tool Nmap.

$ sudo apt-get install nmap

When prompted for the password, enter the sudo password.

The system gives you one y / no Option to confirm the installation. Press AND to confirm and then wait a while for the installation to complete on your system.

Step 3: Get your network’s IP range / subnet mask

Nmap requires a network ID to search for the connected device on a specific network. To find the network ID, we need our IP address and the subnet mask.

Run the following command in the terminal to find out the IP address and subnet mask of your system:

$ ip a

The above output indicates that our system is using the IP address 192.168.72.164 / 24. / 24 indicates that our subnet mask is 255.255.255.0. This means that our network ID is 192.168.72.0 and the network range is from 192.168.72.1 to 192.168.72.255.advertising

(Note: The network ID is calculated by ANDing the IP address and the subnet mask. If you do not know how to do the AND, you can use any online subnet calculator).

Step 4: Search the network for connected devices with Nmap

Now that we have our network ID, carry out the Nmap scan with you –Sn Option with the following syntax:

$ nmap –sn <Network_ID/prefix>

In our scenario it would be:

$ nmap -sn 192.168.72.0/24

Using Nmap With –Sn Option doesn’t scan the ports, it just returns a list of live hosts:

Search network for connected devices

The above results show that there are three active devices connected to our network including our system (192.168.72.164)

That’s all! We learned how to use the Nmap tool to find the attached devices that are connected to a network. It can help you identify which unwanted users are connected to and using your network bandwidth.

How to find devices connected to your network using Debian Linux