If you want to list valid connected IPs in your local network, you can do it by logging into your router if you have a password, else you can check connected client IPs command line using either of the following two commands.
Let’s see, how you can list connected systems IPs in your netowrk using these commands
List IPs using command namp
Basically this command namp is used to scan networks. It is most widely used as port scanner. You can do many things with this command.
Auditing the security of a device or firewall by identifying the network
Identifying open ports on a target host
Network i maintenance and asset management.
Generating traffic to hosts on a network, response analysis and response time measurement.
Find and exploit vulnerabilities in a network
Ok, lets come to main thing listing IPs of connected systems in network
nmap -sP 192.168.1.*
Where, you have to specify the IP range or subnet to scan to get the list of connected hosts. Options -sP no port scan based on your version you can also use option -sn .
Warning: Do not performs scans on a network without proper authorization.
List IPs using command arp
Basically arp is the protocol which stands for Address Resolution Protocol. Many linux boxes are loaded with command arp
Ping your network using a broadcast address i.e. “ping 192.168.2.255” if your IP is 192.168.2.8 or something in same network. After that, perform “arp -a” to determine all the computing devices connected to the network
Note: You can find your broadcast IP in ifconfig output for corresponding network interface
You can use the following command to list connected clients after you ping your broadcast IP,
This command will list most of the IPs found but it’s not that much accurate. Some times routers hide machines which are connected via wire to the machines which are connected via wifi network.