Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1385 → Rev 1386

/alcasar.sh
1392,10 → 1392,9
##########################################################
BL ()
{
# modify iptables init script in order to load the ipsets
[ -e /usr/libexec/iptables.init.default ] || cp /usr/libexec/iptables.init /usr/libexec/iptables.init.default
sed -i 's/^IPTABLES_CONFIG=\/etc\/sysconfig\/iptables/IPTABLES_CONFIG=\/etc\/sysconfig\/iptables\nIPSET_CONFIG=\/etc\/sysconfig\/ipset_save/' /usr/libexec/iptables.init
sed -i 's/if \[ -f \$IPTABLES_CONFIG \]; then/if \[ -f \$IPSET_CONFIG \] \&\& \[ -f \$IPTABLES_CONFIG \]; then\n\t\t\/sbin\/ipset -! restore < \$IPSET_CONFIG/' /usr/libexec/iptables.init
# modify iptables boot file to start alcasar-iptables.sh when the system is booting
[ -e /lib/systemd/system/iptables.service.default ] || cp /lib/systemd/system/iptables.service /lib/systemd/system/iptables.service.default
$SED 's/ExecStart=\/usr\/libexec\/iptables.init start/ExecStart=\/usr\/local\/bin\/alcasar-iptables.sh/' /lib/systemd/system/iptables.service
# copy and extract toulouse BL
rm -rf $DIR_DG/lists/blacklists
tar zxf $DIR_CONF/blacklists.tar.gz --directory=$DIR_DG/lists/ > /dev/null 2>&1
1403,7 → 1402,6
mkdir $DIR_DG/lists/blacklists/ossi
touch $DIR_DG/lists/blacklists/ossi/domains $DIR_DG/lists/blacklists/ossi/domains_wl
touch $DIR_DG/lists/blacklists/ossi/urls $DIR_DG/lists/blacklists/ossi/urls_wl
touch $DIR_DEST_SHARE/iptables-wl/ossi
chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
# creation of file for the rehabilited domains and urls