A simple script to automatically download and update the list of Cloudflare IP addresses (IPv4 and IPv6).
The lists are updated automatically every 4 hours via GitHub Actions.
https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_raw.txt
https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_nginx.conf
sudo curl -fsSL https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_nginx.conf -o /etc/nginx/cloudflare_ips.confsudo crontab -e
0 */5 * * * curl -fsSL https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_nginx.conf -o /etc/nginx/cloudflare_ips.confThis will download the list of Cloudflare IP addresses every 5 hours.
real_ip_header CF-Connecting-IP;
include /etc/nginx/cloudflare_ips.conf;
MIT