Posted: Thu Jul 17, 2014 22:05 Post subject: [SCRIPT] Show Active Host Information from Network
I wrote a script that shows information about Clients in the Network!
Check criterias are
-Ping
-ARP Entries
-/etc/hosts entries
-leases from DHCP
How to install
1. Go to Webinterface -> Administration -> Commands
2. Copy script and paste it into the CommandBox!
3. Click "Save Startup"
You´re done !
Reboot your Router and wait about 5 minutes to let the script collect data! (Every IP needs 2 seconds in worst case)
Change the firstIP, lastIP and sleeptime variable in the script to match your private network!
Code:
## status_log.sh
## by sebsch1991
## handam000@yahoo.de
##
## This Script only works if your SubnetMask is 24 or more bit !
##
while true
do
firstIP=2.2.2.1 # Set first usable IP-Address in your Subnet here (EXAMPLE 192.168.0.0/24 -> First usable IP is 192.168.0.1)
lastIP=2.2.2.62 # Set last usable IP-Address in your Subnet here (EXAMPLE 192.168.0.0/24 -> Last usable IP is 192.168.0.254)
sleeptime=300 # Set time to wait til the script will run again and refresh the informations! (at least 2 seconds per IP in your range!)
test-pc is reachable by ping and listet in arp table
testpc2 is reachable by ping not listet in arp table
2.2.2.50 is not reachable and was known as a DHCP client