1
0
This commit is contained in:
root
2019-08-28 16:58:30 +02:00
parent 58c8ecc682
commit 7dd9ec5fd5
5 changed files with 54 additions and 25 deletions
+11 -6
View File
@@ -1,21 +1,26 @@
#!/bin/bash
cd "$(dirname "$0")"
echo "Runinng list update"
date_good=`date +"%Y-%m-%d %T"`
echo "* ${date_good} Runinng list update"
python ./lists_updater.py
echo "Create ipset blocklists if not existing"
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
#ipset create blacklist_ipv6 -exist hash:net family inet hashsize 16777216 maxelem 16777216
echo "Import lists into ipset"
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"
echo "* Saving ipset"
ipset save > /etc/ipset.conf
echo "* Cleanup ipset files"
rm ./ipset_ipv4.set
rm ./ipset_ipv6.set
#rm ./ipset_ipv6.set
rm ./ipset_subnets.set