ipset
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
echo "Runinng list update"
|
||||
python ./lists_updater.py
|
||||
|
||||
echo "Create ipset blocklists if not 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"
|
||||
ipset restore < ipset_ipv4.set
|
||||
#ipset restore < ipset_ipv6.set
|
||||
ipset restore < ipset_subnets.set
|
||||
|
||||
echo "Saving ipset"
|
||||
ipset save > /etc/ipset.conf
|
||||
|
||||
rm ./ipset_ipv4.set
|
||||
rm ./ipset_ipv6.set
|
||||
rm ./ipset_subnets.set
|
||||
Reference in New Issue
Block a user