How to find out what computers are connected to an access point/router using Linux terminal?

3

2

I would like to determine what computers are currently connected to my access point/router via the command line in Linux.

How can I do this?

classer

Posted 2011-02-10T23:54:03.587

Reputation: 2 465

Answers

3

You can also try:

arp-scan [network/CIDR] eg: arp-scan 192.168.1.0/24

You may need to install arp-scan - most major distributions have it in their repos.

Linker3000

Posted 2011-02-10T23:54:03.587

Reputation: 25 670

2

nmap -A -T4 'ip of your network'

user67101

Posted 2011-02-10T23:54:03.587

Reputation: 21

well just to make sure I did ifconfig to ifconfigfind my network ip and it returned inet addr as 192.168.1.101 so I then did nmap -A -T4 192.168.1.101 and got this back Starting Nmap 5.00 ( http://nmap.org ) at 2011-02-12 16:48 CET Note: Host seems down. If it is really up, but blocking our ping probes, try -PN Nmap done: 1 IP address (0 hosts up) scanned in 2.09 seconds

– classer – 2011-02-12T15:49:10.630

2

I use arp -an

mybox $ arp -an
? (172.16.17.135) à f0:1f:af:36:93:fa [ether] sur wlan1
? (172.16.17.143) à f8:16:54:95:ac:b2 [ether] sur wlan1
? (172.16.17.65) à 8c:70:5a:a4:74:a8 [ether] sur wlan1
? (172.16.17.1) à 00:1C:d4:01:06:0c [ether] sur wlan1

If you feel adventurous, you can use arp -a which will try to resolv IP.

This will show you only local host with active connection.

Edit:

arp is somehow deprecated, now you sould use ip n (n as neighbour).

Archemar

Posted 2011-02-10T23:54:03.587

Reputation: 1 547

IMHO, the -a non-tabular output format is less lucid than without -a.. – eMPee584 – 2015-11-19T13:36:10.113

0

Depending on Linux version and also on network configuration you need to supply network information for arp-scan so it knows what to scan as you may have (and usually you do) multiple interfaces.

I'd recommend this command options

sudo arp-scan --localnet --interface=en1

First of all, you may need sudo because arp-scan uses some services that require root privileges.

--localnet frees you from having to know your IP and it will scan 256 addresses like 192.168.1.0/24but will handle address for you automagically.

--interface=en1 is the interface it will use in case default en0 is not your active link. To check which interface is active along with other useful information use

ifconfig

If you are using Mac OS X, you will need to install package. To do so, visit Rudix repository, download and install package (you will need administrative privileges and password) and then use like I suggested.

MacMladen

Posted 2011-02-10T23:54:03.587

Reputation: 11