#!/bin/bash cd "$(dirname "$0")" date_good=`date +"%Y-%m-%d %T"` echo "* ${date_good} Runinng list update" python ./lists_updater.py echo "* Create ipset blocklists if not already existing" ipset create blacklist_net -exist hash:net family inet hashsize 16777216 maxelem 16777216 ipset create blacklist_ipv4 -exist hash:ip family inet hashsize 16777216 maxelem 16777216 #ipset create blacklist_ipv6 -exist hash:net family inet hashsize 16777216 maxelem 16777216 echo "* Import lists into ipset" echo "== Import ipv4 ipset" ipset restore < ipset_ipv4.set #echo "== Import ipv6 ipset" #ipset restore < ipset_ipv6.set echo "== Import subnets ipset" ipset restore < ipset_subnets.set echo "* Saving ipset" ipset save > /etc/ipset.conf echo "* Cleanup ipset files" rm ./ipset_ipv4.set #rm ./ipset_ipv6.set rm ./ipset_subnets.set