Subversion Repositories ALCASAR

Rev

Rev 2973 | Blame | Compare with Previous | Last modification | View Log

#!/bin/sh
#
# alcasar-list-ip_gw.sh
# by Rexy
# This script is distributed under the Gnu General Public License (GPL)

# This script displays authenticated systems (users & @MAC) with their gw
# Ce script affiche les systèmes authentifiés (utilisateurs et @MAC) avec leur routeur

CONF_FILE="/usr/local/etc/alcasar.conf"

nb_gw=`grep ^WAN $CONF_FILE | wc -l`
for (( i = 0 ; i <= $nb_gw ; i++ ));do
        gw="gw$i"; gw_order=`expr $i + 1`
        ip_list=`ipset l $gw|grep -v :`
        for ip in $ip_list;do
                echo "$ip $gw_order"
        done    
done