Subversion Repositories ALCASAR

Rev

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

Rev 672 Rev 699
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-bypass.sh 672 2011-07-08 15:34:22Z richard $
2
# $Id: alcasar-bypass.sh 699 2011-08-29 15:19:49Z franck $
3
 
3
 
4
# alcasar-bypass.sh
4
# alcasar-bypass.sh
5
# by Franck BOUIJOUX and Richard REY
5
# by Franck BOUIJOUX and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 30... Line 30...
30
		done
30
		done
31
		echo "Configure eth1 ..."
31
		echo "Configure eth1 ..."
32
		ifup eth1
32
		ifup eth1
33
		sh /usr/local/bin/alcasar-iptables-bypass.sh
33
		sh /usr/local/bin/alcasar-iptables-bypass.sh
34
		echo "Configure dnsmasq ..."
34
		echo "Configure dnsmasq ..."
35
		$SED "s?^conf-dir=.*?#&?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf
35
		$SED "s?^conf-dir=.*?#&?g" /etc/dnsmasq-blackhole.conf
36
		$SED "s?^no-dhcp-interface=.*?#&?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf
36
		$SED "s?^no-dhcp-interface=.*?#&?g" /etc/dnsmasq.conf /etc/dnsmasq-blackhole.conf
37
		/etc/init.d/dnsmasq start
37
		/etc/init.d/dnsmasq start
38
		echo "Le contournement des modules d'authentification de filtrage est activé"
38
		echo "Le contournement des modules d'authentification de filtrage est activé"
39
		echo "les journaux de connexions continuent néanmoins d'être enregistrés"
39
		echo "les journaux de connexions continuent néanmoins d'être enregistrés"
40
		;;
40
		;;
41
	--off | -off)
41
	--off | -off)
42
		# désactivation du contournement
42
		# désactivation du contournement
43
		if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
43
		if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
44
		echo "Configure dnsmasq ..."
44
		echo "Configure dnsmasq ..."
45
		$SED "s?^#conf-dir=.*?conf-dir=/usr/local/etc/alcasar-dnsfilter-enabled?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf
45
		$SED "s?^#conf-dir=.*?conf-dir=/usr/local/etc/alcasar-dnsfilter-enabled?g" /etc/dnsmasq-blackhole.conf
46
		$SED "s?^#no-dhcp-interface=.*?no-dhcp-interface=eth1?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf
46
		$SED "s?^#no-dhcp-interface=.*?no-dhcp-interface=eth1?g" /etc/dnsmasq.conf /etc/dnsmasq-blackhole.conf
47
		for i in chilli squid dansguardian havp mysqld radiusd httpd freshclam dnsmasq
47
		for i in chilli squid dansguardian havp mysqld radiusd httpd freshclam dnsmasq
48
		do
48
		do
49
			if  ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
49
			if  ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
50
		done
50
		done
51
		sh /usr/local/bin/alcasar-iptables.sh
51
		sh /usr/local/bin/alcasar-iptables.sh