1394,7 → 1394,11 |
########################################################## |
BL () |
{ |
# copy and extract of Toulouse 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 |
# 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 |
# creation of the OSSI BL and WL categories (domain name and url) |
1401,6 → 1405,9 |
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 |
[ -e $DIR_DG/lists/exceptionsitelist.default ] || mv $DIR_DG/lists/exceptionsitelist $DIR_DG/lists/exceptionsitelist.default |
[ -e $DIR_DG/lists/exceptionurllist.default ] || mv $DIR_DG/lists/exceptionurllist $DIR_DG/lists/exceptionurllist.default |
1430,12 → 1437,11 |
EOF |
# change the the google safesearch ("safe=strict" instead of "safe=vss") |
$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist |
chown -R dansguardian:apache $DIR_DG |
chmod -R g+rw $DIR_DG |
# adapt the BL to ALCASAR architecture. Enable the default categories |
if [ "$mode" != "update" ]; then |
$DIR_DEST_SBIN/alcasar-bl.sh --adapt |
$DIR_DEST_SBIN/alcasar-bl.sh --cat_choice |
$DIR_DEST_SBIN/alcasar-bl.sh --ip_retrieving |
fi |
} |
|