26,7 → 26,6 |
exit 0 |
;; |
--on | -on) |
# activation du contournement |
/usr/local/sbin/alcasar-logout.sh all |
for i in chilli |
do |
35,13 → 34,13 |
cp /etc/sysconfig/network-scripts/default-ifcfg-$INTIF /etc/sysconfig/network-scripts/ifcfg-$INTIF |
ifup $INTIF |
sh /usr/local/bin/alcasar-iptables-bypass.sh |
$SED "s?^no-dhcp-interface.*?#&?g" /etc/dnsmasq.conf |
$SED "s?^no-dhcp-interface.*?#&?g" /etc/dnsmasq.conf # dnsmasq become the DHCP server |
/usr/bin/systemctl restart dnsmasq |
rm -f /etc/cron.d/alcasar-daemon-watchdog # don't restart daemons (specially coova) |
echo "ALCASAR est en mode 'bypass'" |
echo "ALCASAR is in 'bypass' mode" |
;; |
--off | -off) |
# désactivation du contournement |
$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 |
49,6 → 48,11 |
rm -f /etc/sysconfig/network-scripts/ifcfg-$INTIF |
/usr/bin/systemctl start chilli |
sh /usr/local/bin/alcasar-iptables.sh |
# activation of the "daemon-watchdog" every 18' |
cat << EOF > /etc/cron.d/alcasar-daemon-watchdog |
# activation du "chien de garde" (daemon-watchdog) toutes les 18' |
*/18 * * * * root $DIR_DEST_BIN/alcasar-daemon.sh > /dev/null 2>&1 |
EOF |
echo "L'authentification et le filtrage sont actifs" |
echo "Authentication and filtering system are enabled" |
;; |