ipset

#!/bin/bash
curl http://www.ipdeny.com/ipblocks/data/countries/pl.zone > /tmp/polska
rm -f /tmp/polska.ipset
while IFS='' read -r line || [[ -n "$line" ]]; do
    echo "add pl $line -exist" >> polska.ipset
done < /tmp/polska
#ipset x pl
ipset create pl hash:net -exist
ipset restore < /tmp/polska.ipset
  • faq/iptables.txt
  • Last modified: 19 months ago
  • by Dr Serge Victor