27,34 → 27,30 |
;; |
--on | -on) |
# activation du contournement |
for i in chilli dansguardian havp mysqld radiusd httpd freshclam dnsmasq squid |
/usr/local/sbin/alcasar-logout.sh all |
for i in chilli |
do |
if (pgrep $i) > /dev/null ; then /usr/bin/systemctl stop $i.service ; fi |
done |
echo "$INTIF configuration ..." |
cp /etc/sysconfig/network-scripts/default-ifcfg-$INTIF /etc/sysconfig/network-scripts/ifcfg-$INTIF |
ifup $INTIF |
sh /usr/local/bin/alcasar-iptables-bypass.sh |
echo "dnsmasq Configuration ..." |
$SED "s?^conf-dir=.*?#&?g" /etc/dnsmasq-blacklist.conf |
$SED "s?^no-dhcp-interface=.*?#&?g" /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf |
/etc/init.d/dnsmasq start |
echo "Le contournement des modules d'authentification de filtrage est activé" |
echo "les journaux de connexions continuent néanmoins d'être enregistrés" |
$SED "s?^no-dhcp-interface.*?#&?g" /etc/dnsmasq.conf |
/usr/bin/systemctl restart dnsmasq |
echo "ALCASAR est en mode 'bypass'" |
echo "ALCASAR is in 'bypass' mode" |
;; |
--off | -off) |
# désactivation du contournement |
if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi |
echo "dnsmasq Configuration ..." |
$SED "s?^#conf-dir=.*?conf-dir=/usr/local/share/dnsmasq-bl-enabled?g" /etc/dnsmasq-blacklist.conf |
$SED "s?^#no-dhcp-interface=.*?no-dhcp-interface=$INTIF?g" /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf |
$SED "s?^#no-dhcp-interface=$INTIF?no-dhcp-interface=$INTIF?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=tun0?no-dhcp-interface=tun0?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=lo?no-dhcp-interface=lo?g" /etc/dnsmasq.conf |
systemctl restart dnsmasq |
rm -f /etc/sysconfig/network-scripts/ifcfg-$INTIF |
for i in chilli dansguardian havp mysqld radiusd httpd freshclam dnsmasq squid |
do |
if ! (pgrep $i) > /dev/null ; then /usr/bin/systemctl start $i.service; fi |
done |
/usr/bin/systemctl start chilli |
sh /usr/local/bin/alcasar-iptables.sh |
echo "L'authentification et le filtrage sont de nouveau activés" |
echo "L'authentification et le filtrage sont actifs" |
echo "Authentication ans filterig system are enabled" |
;; |
*) |
echo "Argument inconnu :$1"; |