Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Allow only CloudFlare
for cf in $(curl https://www.cloudflare.com/ips-v4); do
echo -e "-> Adding CloudFlare IPs: $cf"
  iptables -A INPUT -p tcp -m multiport --dports 80,443 -s "$cf" -j ACCEPT
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment