Dumb AP - Associated Stations Resolver

I have a few suggestions here.
First off there's no need to flll /etc/ethers & co with entries which don't get deleted. But let's start from the beginning. It all started with this right? arp-scan -qxlN -I br-lan | awk '{print $1}' | xargs fping -q -c1

So let's ee what this comman does: It does an arp ping to all possible IPs, creating a list of IP and MAC adresses found. Then it takes this list, removes the MAC adresses and does an ARP ping to the IPs.
So why are we doing two ARP pings here? Cause fping does reverse DNS lookups, too. arp-scan can do reverse DNS too, through, so the command can be reduced to arp-scan -qxdlN -I br-lan.
Now when you add that to a cron job you'll notie that it shows IPs but not hostnames. Cause of this people came up with killing NAND by writing to files on it, then moved said files to RAM and stuff... All overly compilcated cause the real issue here is that OpenWRTs DNS server tries to do reverse DNS by itself instead of asking the upper DNS server like it does for normal queries. There's a workaround for this through: Just add a custom DNS rule like this /*.in-addr.arpa/192.168.178.1 (make sure to replace 192.168.178.1 with the IP of your upper/main DNS server) and reverse DNS queries will be resolved correctly.

tl;dr:
No need for a bunch of scripts and creating files. Just do this instead:
image

image

And you'll get:

5 Likes