Subversion Repositories ALCASAR

Rev

Rev 1876 | Rev 1932 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1876 Rev 1896
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-iptables.sh 1876 2016-05-06 16:14:56Z raphael.pion $
2
# $Id: alcasar-iptables.sh 1896 2016-05-18 15:38:04Z raphael.pion $
3
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
3
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
4
# This script writes the netfilter rules for ALCASAR
4
# This script writes the netfilter rules for ALCASAR
5
# Rexy - 3abtux - CPN
5
# Rexy - 3abtux - CPN
6
#
6
#
7
# Reminders
7
# Reminders
Line 119... Line 119...
119
	ipset del bl_ip_blocked $ip
119
	ipset del bl_ip_blocked $ip
120
done
120
done
121
 
121
 
122
###### WL set  ###########
122
###### WL set  ###########
123
# Calcul de la taille / Compute the length
123
# Calcul de la taille / Compute the length
124
wl_set_length=$(($(wc -l $DIR_WL_IP_ENABLED/* | awk '{print $1}' | tail -n 1)*3))
124
#wl_set_length=$(($(wc -l $DIR_WL_IP_ENABLED/* | awk '{print $1}' | tail -n 1)*3))
-
 
125
wl_set_length=65536
125
# Chargement Loading
126
# Chargement Loading
126
echo "create wl_ip_allowed hash:net family inet hashsize 1024 maxelem $wl_set_length" > $TMP_set_save
127
echo "create wl_ip_allowed hash:net family inet hashsize 1024 maxelem $wl_set_length" > $TMP_set_save
127
#get ip-wl files from ACC
128
#get ip-wl files from ACC
128
for ossi in `ls -1 $DIR_WL_IP_ENABLED`
129
for ossi in `ls -1 $DIR_WL_IP_ENABLED`
129
do
130
do