99,17 → 99,14 |
# destruction de tous les SET |
# destroy all SET |
ipset destroy |
|
ipset flush blacklist_ip_blocked |
ipset destroy blacklist_ip_blocked |
ipset flush whitelist_ip_allowed |
ipset destroy whitelist_ip_allowed |
|
|
###### BL set ########### |
# Calcul de la taille / Compute the length |
bl_set_length=$(($(wc -l $BL_IP_CAT/* | awk '{print $1}' | tail -n 1)+$(wc -l $BL_IP_OSSI | awk '{print $1}'))) |
|
|
# Chargement / loading |
echo "create blacklist_ip_blocked hash:net family inet hashsize 1024 maxelem $bl_set_length" > $TMP_set_save |
for category in `ls -1 $BL_IP_CAT | cut -d '@' -f1` |
133,7 → 130,6 |
#get ip-wl files from ACC |
for ossi in `ls -1 $DIR_WL_IP_ENABLED` |
do |
echo $ossi |
cat $DIR_WL_IP_ENABLED/$ossi >> $TMP_set_save |
done |
ipset -! restore < $TMP_set_save |