View Single Post
  #4   Report Post  
Posted to alt.internet.wireless,alt.os.linux,sci.electronics.repair
Clément Durand Clément Durand is offline
external usenet poster
 
Posts: 12
Default How to get a list of IP addresses connected to a WISP homebroadband router?

Jeff Liebermann wrote, on Mon, 11 Aug 2014 09:43:50 -0700:

#!/bin/bash
test_with_ping()
{
ping -c 1 $1 /dev/null
[ $? -eq 0 ] && echo $IP,UP
[ $? -eq 1 ] && echo $IP,dn
}

for IP in 192.168.1.{1..254}
do
test_with_ping $IP & disown # run in background
done

Use "nohup" if your bash doesn't do "disown".


I think I can figure out the IP addresses connected to the home broadband
router by looking for src=192.168.1.XXX addresses in the previously
mentioned /proc/net/nf_conntrack file.

I did try the script on the Ubiquiti Rocket M2 2.5GHz radio, but, bash
wasn't found (so I changed the shell to "ash") and neither "disown" nor
"nohup" were found.

The script did run, but it didn't output anything (so I need to debug it
further).

But, I think the main issue now is to glean all the information I need
out of the /proc/net/nf_conntrack file because it *seems* to contain
every IP address that goes in and out of the rooftop radio.

While this is WISP, for people with DSL or cable, logging into that
rooftop transceiver would be equivalent to logging into their modem.