Skip to content

Instantly share code, notes, and snippets.

@mangege
Last active December 24, 2018 14:33
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 mangege/15a461896df109d16f12d2a815507061 to your computer and use it in GitHub Desktop.
Save mangege/15a461896df109d16f12d2a815507061 to your computer and use it in GitHub Desktop.
# https://gist.github.com/mangege/15a461896df109d16f12d2a815507061
curl https://www.cloudflare.com/ips-v4 | awk '{print "allow " $1 ";"}' > /tmp/a.txt
curl https://www.cloudflare.com/ips-v6 | awk '{print "allow " $1 ";"}' >> /tmp/a.txt
cp /tmp/a.txt /etc/nginx/cloudflare-allow.conf
cat /etc/nginx/cloudflare-allow.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment