Created
July 9, 2020 17:08
-
-
Save rojenzaman/ec04d97966134ed7fe24a2faa813cc46 to your computer and use it in GitHub Desktop.
UFW Rules Update for Cloudflare CDN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /root/cf | |
curl https://www.cloudflare.com/ips-v4 > ips-v4 | |
curl https://www.cloudflare.com/ips-v6 > ips-v6 | |
for i in `<ips-v4`; do ufw allow from $i proto tcp to any port 80,443; done | |
for i in `<ips-v6`; do ufw allow from $i proto tcp to any port 80,443; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment