Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.

Latest commit

 

History

History
41 lines (28 loc) · 1.1 KB

File metadata and controls

41 lines (28 loc) · 1.1 KB

Cloudflare IP Ranges

A simple script to automatically download and update the list of Cloudflare IP addresses (IPv4 and IPv6).

⚠️ Deprecated

Moved to https://github.com/sefinek/trusted-ips-whitelist.

Lists

The lists are updated automatically every 4 hours via GitHub Actions.

Raw

https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_raw.txt

Nginx

https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_nginx.conf

Nginx Configuration

Download File

sudo curl -fsSL https://raw.githubusercontent.com/sefinek/Cloudflare-IP-Ranges/main/lists/cloudflare_ips_nginx.conf -o /etc/nginx/cloudflare_ips.conf

Set up Cron

sudo 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.conf

This will download the list of Cloudflare IP addresses every 5 hours.

Config (/etc/nginx/sites-available)

real_ip_header CF-Connecting-IP;
include /etc/nginx/cloudflare_ips.conf;

License

MIT