View Single Post
  #1   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?

Clément Durand wrote, on Sat, 09 Aug 2014 21:05:32 +0000:

How do I find what machines are connected & their traffic?
I can log into my ubiquiti Rocket M2 radio from Linux using:
$ ssh -l ubnt IP ADDRESS
I know the IP address of the home broadband router (192.168.1.100) which
is connected to the radio, but my first question is how I would find that
router IP address if I didn't already know it?

Route -n doesn't seem to report the router (which is 192.168.1.100):
XM.v5.5.6# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.50.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
0.0.0.0 10.50.0.1 0.0.0.0 UG 0 0 0 ath0


I'm surprised Jeff Liebermann hasn't responded, since he knows
everything about setting up WiFi security, but, luckily, I *think*
I have figured out one potential way to tell what the home broadband
router IP address might be from the Ubiquiti AirOS command line.

Assuming the rooftop antenna Rocket M2 is at IP 192.168.1.20 and the
home broadband router connected to it by wire is at 192.168.1.1 ...

$ ssh -l ubnt 192.168.1.20
XM.v5.5.8#

At that prompt, cat this file:
XM.v5.5.8# cat /tmp/dhcpd.leases

More often than not, that file seems to contain the IP address of the
home broadband router which is connected to the rooftop transceiver.

If you know of a *better* way to find the IP address of the router which
is connected to your Ubiquiti AirOS device, please let me know.

The router IP address will also be in the radio /proc/net/nf_conntrack
file, so, I think we can grep for it using a syntax sort of like the following:

XM.v5.5.8# grep 192.168.1. /proc/net/nf_conntrack