Skip to content

Instantly share code, notes, and snippets.

@AD7six
Created December 13, 2014 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AD7six/f4931897f6258e9ad013 to your computer and use it in GitHub Desktop.
Save AD7six/f4931897f6258e9ad013 to your computer and use it in GitHub Desktop.
iptables -F
# From https://www.cloudflare.com/ips
for ip in `curl https://www.cloudflare.com/ips-v4`; do
iptables -A INPUT -p tcp -s $ip --dport 80 -j ACCEPT
done
iptables -A INPUT -p tcp --dport 80 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment