Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1368 → Rev 1369

/alcasar.sh
1132,7 → 1132,7
for log_type in traceability ssh ext-access
do
[ -e /lib/systemd/system/ulogd-$log_type.service ] || cp -f /lib/systemd/system/ulogd.service /lib/systemd/system/ulogd-$log_type.service
/var/log/firewall/$log_type.log ] || echo "" > /var/log/firewall/$log_type.log
[ -e /var/log/firewall/$log_type.log ] || echo "" > /var/log/firewall/$log_type.log
cp -f /etc/ulogd.conf /etc/ulogd-$log_type.conf
$SED "s?^nlgroup=.*?nlgroup=$nl?g" /etc/ulogd-$log_type.conf
$SED '/OPRINT/,$d' /etc/ulogd-$log_type.conf
/scripts/alcasar-urpmi.sh
218,7 → 218,7
else
echo "Nettoyage du système : "
fi
for rm_rpm in shorewall mandi radeontool avahi mageia-gfxboot-theme
for rm_rpm in shorewall mandi radeontool avahi mageia-gfxboot-theme privoxy
do
/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
echo -n "."
/scripts/sbin/alcasar-bl.sh
24,7 → 24,6
BL_CATEGORIES_ENABLED="$DIR_CONF/alcasar-bl-categories-enabled" # ' ' BL enabled categories
WL_CATEGORIES_ENABLED="$DIR_CONF/alcasar-wl-categories-enabled" # ' ' WL enabled categories
DIR_SHARE="/usr/local/share"
FILE_IP_WL="$DIR_SHARE/ossi_wl"
DIR_DNS_BL="$DIR_SHARE/dnsmasq-bl" # all the BL in the DNSMASQ format
DIR_DNS_WL="$DIR_SHARE/dnsmasq-wl" # all the WL ' ' '
DIR_IP_BL="$DIR_SHARE/iptables-bl" # all the IP addresses of the BL
96,15 → 95,12
/usr/local/bin/alcasar-iptables.sh
fi
}
usage="Usage: alcasar-bl.sh { -on or --on } | { -off or --off } | { -download or --download } | { -adapt or --adapt } | { -reload or --reload }"
usage="Usage: alcasar-bl.sh { -cat_choice or --cat_choice } | { -download or --download } | { -adapt or --adapt } | { -reload or --reload }"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
echo "Set BlackList Filtering to ON"
cat_choice
bl_enable
exit 0
args="-h"
fi
case $args in
-\? | -h* | --h*)
111,18 → 107,10
echo "$usage"
exit 0
;;
# enable the filtering
-on | --on)
# Retrieve Toulouse BL
-cat_choice | --cat_choice)
cat_choice
$SED "s?^DNS_FILTERING.*?DNS_FILTERING=on?g" $CONF_FILE
bl_enable
;;
# disable the filtering
-off | --off)
$SED "s?^DNS_FILTERING.*?DNS_FILTERING=off?g" $CONF_FILE
bl_disable
;;
# Retrieve Toulouse BL
-download | --download)
rm -rf /tmp/con_ok.html
`/usr/bin/curl $BL_SERVER -# -o /tmp/con_ok.html`
140,21 → 128,20
# Adapt Toulouse BL to ALCASAR architecture (dnsmasq + DG + iptables)
-adapt | --adapt)
echo -n "Toulouse BlackList migration process. Please wait : "
# Saving whitelist ip
if [ -e $FILE_IP_WL ]
# Saving OSSI files (IP_WL, IP_BL, domain)
if [ -e $DIR_SHARE/ossi-ip-wl ]
then
cp $FILE_IP_WL $DIR_tmp
cp $DIR_SHARE/ossi-ip-wl $DIR_tmp/ossi-ip-wl
else
touch $FILE_IP_WL
chown apache $FILE_IP_WL
touch $DIR_SHARE/ossi-ip-wl
chown apache $DIR_SHARE/ossi-ip-wl
fi
# Saving ossi category
if [ -f $DIR_tmp/blacklists.tar.gz ]
then
[ -d $DIR_DG_BL/ossi ] && mv $DIR_DG_BL/ossi $DIR_tmp
[ -e $DIR_IP_BL/ossi ] && mv $DIR_IP_BL/ossi $DIR_tmp/ossi-ip
rm -rf $DIR_DG_BL
mkdir $DIR_DG_BL
[ -e $DIR_IP_BL/ossi ] && mv $DIR_IP_BL/ossi $DIR_tmp/ossi-ip-bl
rm -rf $DIR_DG_BL $DIR_IP_BL
mkdir $DIR_DG_BL $DIR_IP_BL
tar zxf $DIR_tmp/blacklists.tar.gz --directory=$DIR_DG/
[ -d $DIR_tmp/ossi ] && mv -f $DIR_tmp/ossi $DIR_DG_BL/
fi
224,9 → 211,8
done
rm -f $FILE_tmp $FILE_ip_tmp
# Restoring ossi files
[ -e $DIR_tmp/ossi-ip ] && mv $DIR_tmp/ossi-ip $DIR_IP_BL/ossi
[ -e $DIR_tmp/ossi_wl ] && mv $DIR_tmpi/ossi_wl $DIR_SHARE/ossi_wl
fi
[ -e $DIR_tmp/ossi-ip-bl ] && mv $DIR_tmp/ossi-ip-bl $DIR_IP_BL/ossi
[ -e $DIR_tmp/ossi-ip-wl ] && mv $DIR_tmp/ossi-ip-wl $DIR_SHARE/ossi-ip-wl
rm -rf $DIR_tmp
echo
;;
/scripts/sbin/alcasar-profil.sh
20,14 → 20,19
function list () {
for i in $ALL_PROFILS
do
if [ $Lang == "fr" ]
then
echo "Comptes liés au profil '$i' :"
if [ $Lang == "fr" ]
then
echo -n "Comptes liés au profil '$i' : "
 
else
echo "accounts linked with profile '$i' :"
fi
cat $DIR_KEY/key_only_$i | cut -d':' -f1|sort
else
echo -n "accounts linked with profile '$i' : "
fi
account_list=`cat $DIR_KEY/key_only_$i | cut -d':' -f1|sort`
for account in $account_list
do
echo -n "$account "
done
echo
done
}
# ajoute les comptes du profil "admin" aux autres profils
/scripts/sbin/alcasar-uninstall.sh
145,7 → 145,7
 
#nfsen
echo -en "\n- nfsen(2) : "
[ `grep "^nfsen:" /etc/passwd | wc -l` == 1 ] && userdel -r nfsen && echo -n "1, "
[ `grep "^nfsen:" /etc/passwd | wc -l` == 1 ] && userdel -r nfsen 2>/dev/null && echo -n "1, "
[ `grep "^www-data:" /etc/group | wc -l` == 1 ] && userdel -r www-data 2>/dev/null && groupdel www-data 2>/dev/null && echo -n "2"
 
# We keep netflow RRD DB for the moment