by

How to find Devices connected to your Network using Debian Linux

Sometimes you need to find out which devices are connected to your network. There can be several reasons for this. Your Internet might be running slower than usual, you might notice some suspicious activity that someone is stealing your Wi-Fi, or you might be fixing a problem. Whatever the reason, it’s a good idea to check who else is connected to your network so that appropriate action can be taken.

Nmap is a great tool that can help you find devices attached 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 provide, what operating system version they are running, and 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

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

Step 2: Install the network scanning tool Nmap

Now in the Terminal application, run the following command as sudo to install the network scanning tool Nmap.

$ sudo apt-get install nmap

When prompted for the password, enter the sudo password.

Install nmap

The system will provide you with a y/n option to confirm the installation. Press Y to confirm and then wait for a while until the installation is completed on your system.

Step 3: Get the IP range/subnet mask of your network

Nmap needs a network ID to scan for the connected device on a specific network. So in order to find network ID, we will need our IP address and the subnet mask.

Run the below command in Terminal to find the IP address and subnet mask of your system:

$ ip a

Get IP range or subnet mask

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

(Note: Network ID is calculated by performing the AND operation of the IP address and the subnet mask. If you do not know how to perform AND operation, you can any online subnet calculator).

Step 4: Scan network for the connected device(s) with Nmap

Now we have our network ID, run the Nmap scan with –sn option using 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 does not scan the ports, it only returns a list of live hosts:

Scan network for the connected devices

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

That is all there is to it! We have learned how to find the connected devices connected to a network using the Nmap tool. It can help you to identify which unwanted users are connected to and using your network bandwidth.

Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

News Feed