Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Created by antipatico (
# Download the latest cloudflare's IPv4 ranges and create an ipset
# named "cloudflare" you can later use in your iptables rules.
wget --quiet -O $IPSV4
ipset destroy cloudflare
ipset create cloudflare hash:net
while read -r range; do
ipset add cloudflare $range
done < $IPSV4
rm $IPSV4
ipset list cloudflare
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment