curl -L https://gist.githubusercontent.com/Interstellar750/1803cdefcaa91940e87a3d27fe78f17b/raw/add_cf_ips.sh | sudo bashRemove Cloudflare's IP
curl -L https://gist.githubusercontent.com/Interstellar750/1803cdefcaa91940e87a3d27fe78f17b/raw/add_cf_ips.sh > add_cf_ips.sh && sudo bash add_cf_ips.sh --remove./add_cf_ips.sh [PARAMETERS]
without any parameters
Add Cloudflare's IP to your firewall whitelist via ufw
--remove
Remove Cloudflare's IP from your firewall whitelist via ufw
Examples:
./add_cf_ips.sh
./add_cf_ips.sh --remove
Required:
curl Get Cloudflare's IP by sending a request to api.cloudflare.com/client/v4/ips
jq Parse the response data and obtain the IP range