I'm migrating away from some old SSID's and moving to some new ones, and I want to see if I can get a list of clients using the old ones. I've found a bunch of code to list all clients connected to wireless, however I'm stumped on finding which clients are connecting to which SSID's. Is there a way to generate some output for clients connected to specific SSID's?
Hi @surfrock66
here is a quick script for listing assoc stations per wifi interface
#!/bin/sh
for interface in $(iwinfo |grep "ESSID:" | cut -d' ' -f1); do
echo $'\n'
echo -n "Interface $interface : "
iwinfo $interface assoclist | xargs |sed 's/..:..:..:..:..:../\n&/g'
done
you will get output similar to
Interface wlan0 : No station connected
Interface wlan0-vl100 :
C0:18:03:9A:81:6D -62 dBm / -101 dBm (SNR 39) 770 ms ago RX: 72.2 MBit/s, MCS 7, 20MHz 17922 Pkts. TX: 72.2 MBit/s, MCS 7, 20MHz 190560 Pkts. expected throughput: unknown
34:68:95:82:7A:5E -54 dBm / -101 dBm (SNR 47) 780 ms ago RX: 26.0 MBit/s, MCS 3, 20MHz 6786 Pkts. TX: 72.2 MBit/s, MCS 7, 20MHz 165470 Pkts. expected throughput: unknown
Interface wlan0-vl200 : No station connected
Interface wlan0-vl255 : No station connected
Interface wlan1 : No station connected
Interface wlan1-vl100 :
5C:FB:3A:7A:46:53 -56 dBm / -105 dBm (SNR 49) 840 ms ago RX: 6.0 MBit/s 7 Pkts. TX: 300.0 MBit/s, MCS 15, 40MHz 165808 Pkts. expected throughput: unknown
Interface wlan1-vl200 : No station connected
Interface wlan1-vl255 : No station connected
That's perfect, thank you so much!
would you please mark proper answer as solution and topic as [solved] ?
I have a script that also shows the nature of wifi encryption (WPA2, WPA3, WPA2 FT 802.11r, WPA3 FT 802.11r etc..)
root@router1:/etc# ./wifi_suite.sh
Associated wifi stations' AKM suites:
wlan0: AKM suite of e0:c3:77:ae:0a:30 is 00-0f-ac-8 (WPA3-SAE)
wlan0: AKM suite of ac:57:75:56:c1:e0 is 00-0f-ac-6 (WPA-PSK-SHA256)
wlan1: AKM suite of 30:cd:a7:b3:33:5d is 00-0f-ac-2 (WPA-PSK)
Helps in understanding if clients really use WPA3 or FT.
1 Like
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.