Subversion Repositories ALCASAR

Rev

Rev 348 | Rev 401 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1 root 1
#!/bin/sh
63 franck 2
# $Id: alcasar-bypass.sh 383 2010-12-27 20:31:01Z franck $
3
 
1 root 4
# Script portail-bypass
5
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
383 franck 6
usage="Usage: alcasar-bypass.sh {--on or -on } | {--off or -off}"
1 root 7
nb_args=$#
8
args=$1
9
if [ $nb_args -eq 0 ]
10
then
11
	nb_args=1
12
	args="-h"
13
fi
14
case $args in
15
	-\? | -h* | --h*)
16
		echo "$usage"
17
		exit 0
18
		;;
383 franck 19
	--on | -on)	
1 root 20
		# activation du contournement
21
		for i in chilli squid dansguardian httpd mysqld radiusd
22
		do
23
			if  (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
24
		done
25
		echo "Configure eth1 ..."
26
		ifup eth1
27
		sh /usr/local/bin/alcasar-iptables-bypass.sh
348 franck 28
		if ! (pgrep dnsmasq)  > /dev/null ; then /etc/init.d/dnsmasq start ; fi
1 root 29
		echo "Le contournement du module d'authentification et de filtrage WEB est activé"
30
		echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
31
		;;
383 franck 32
	--off | -off)
1 root 33
		# désactivation du contournement
348 franck 34
		if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
1 root 35
		for i in chilli squid dansguardian httpd mysqld radiusd
36
		do
37
			if  ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
38
		done
39
		sh /usr/local/bin/alcasar-iptables.sh
40
		echo "L'authentification et le filtrage WEB sont de nouveau activés"
41
;;
42
	*)
43
		echo "Argument inconnu :$1";
44
		echo "$usage"
45
		exit 1
46
		;;
47
esac