Last Updated or created 2022-09-19
Changed stuff in my arpscanner
I want to know whats on my network, and be informed when a alien device connects.
This also helps me gathering all devices and macaddresses for a cmdb.
I’ve got below in my crontab
5 * * * * root /usr/local/bin/arpscanner
And the script:
#!/bin/bash # Using a scanner on a specific vlan/interface arp-scan -l -g -I p1p1.10 | grep ^10 | grep -vi packets > /var/log/arpscanner cat /var/log/arpscanner | awk '{ print $2 }'| while read ; do grep $REPLY /var/local/arpscanner.lst >/dev/null || echo $REPLY | mail -s arpscanner henri@henriaanstoot.nl done
New and checked devices i put in the file mentioned above:
/var/local/arpscanner.lst
00:21:5d:gg:gg:7a Description ac:67:b2:gg:gg:a0 Liligo Twatch b8:27:eb:gg:dd:fd Nieuwe octoprint d8:f1:5b:gg:gg:4a WLAN Dungeon 48:3f:da:gg:gg:fe Uboot ESP 8e:93:79:gg:gg:5d Tablet Monique d8:f1:5b:gg:gg:06 ESP Radar dc:a6:32:gg:gg:fb RPI4 00:1e:ec:gg:gg:ab laptop 68:05:ca:gg:gg:68 storage bak etcetera