Subversion Repositories ALCASAR

Rev

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

Rev 26 Rev 30
Line 18... Line 18...
18
## Positionnez la variable "FILTERING" du fichier "alcasar-iptables.sh" à "yes" pour activer le filtrage
18
## Positionnez la variable "FILTERING" du fichier "alcasar-iptables.sh" à "yes" pour activer le filtrage
19
## Modifiez le fichier /usr/local/etc/alcasar-services pour l'adapter à vos besoins
19
## Modifiez le fichier /usr/local/etc/alcasar-services pour l'adapter à vos besoins
20
if [ $FILTERING = "yes" ]
20
if [ $FILTERING = "yes" ]
21
	then
21
	then
22
# si le fichier d'exception est renseigné on le traite 
22
# si le fichier d'exception est renseigné on le traite 
23
	nb_exceptions=`wc -w /usr/local/etc/alcasar-nf-exceptions | cut -d" " -f1`
23
	nb_exceptions=`wc -w /usr/local/etc/alcasar-filter-exceptions | cut -d" " -f1`
24
	if [ $nb_exceptions != "0" ]
24
	if [ $nb_exceptions != "0" ]
25
		then
25
		then
26
		while read ip_exception 
26
		while read ip_exception 
27
			do
27
			do
28
			echo $ip_exception
28
			echo $ip_exception
29
			$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW -j ULOG --ulog-prefix "RULE IP-exception -- ACCEPT "
29
			$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW -j ULOG --ulog-prefix "RULE IP-exception -- ACCEPT "
30
			$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW,ESTABLISHED -j ACCEPT
30
			$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW,ESTABLISHED -j ACCEPT
31
			done < /usr/local/etc/alcasar-nf-exceptions
31
			done < /usr/local/etc/alcasar-filter-exceptions
32
		fi
32
		fi
33
# On autorise les protoles non commentés
33
# On autorise les protoles non commentés
34
	while read svc_line
34
	while read svc_line
35
		do
35
		do
36
		svc_on=`echo $svc_line|cut -b1`
36
		svc_on=`echo $svc_line|cut -b1`