Line 1... |
Line 1... |
1 |
#!/bin/sh
|
1 |
#!/bin/sh
|
2 |
# $Id: alcasar-bypass.sh 63 2010-04-08 19:56:10Z franck $
|
2 |
# $Id: alcasar-bypass.sh 348 2010-11-29 21:24:26Z franck $
|
3 |
|
3 |
|
4 |
# Script portail-bypass
|
4 |
# Script portail-bypass
|
5 |
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
|
5 |
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
|
6 |
usage="Usage: alcasar-bypass.sh -on | -off"
|
6 |
usage="Usage: alcasar-bypass.sh -on | -off"
|
7 |
nb_args=$#
|
7 |
nb_args=$#
|
Line 23... |
Line 23... |
23 |
if (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
|
23 |
if (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
|
24 |
done
|
24 |
done
|
25 |
echo "Configure eth1 ..."
|
25 |
echo "Configure eth1 ..."
|
26 |
ifup eth1
|
26 |
ifup eth1
|
27 |
sh /usr/local/bin/alcasar-iptables-bypass.sh
|
27 |
sh /usr/local/bin/alcasar-iptables-bypass.sh
|
28 |
if ! (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd start ; fi
|
28 |
if ! (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq start ; fi
|
29 |
echo "Le contournement du module d'authentification et de filtrage WEB est activé"
|
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"
|
30 |
echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
|
31 |
;;
|
31 |
;;
|
32 |
-off)
|
32 |
-off)
|
33 |
# désactivation du contournement
|
33 |
# désactivation du contournement
|
34 |
if (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd stop ; fi
|
34 |
if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
|
35 |
for i in chilli squid dansguardian httpd mysqld radiusd
|
35 |
for i in chilli squid dansguardian httpd mysqld radiusd
|
36 |
do
|
36 |
do
|
37 |
if ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
|
37 |
if ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
|
38 |
done
|
38 |
done
|
39 |
sh /usr/local/bin/alcasar-iptables.sh
|
39 |
sh /usr/local/bin/alcasar-iptables.sh
|