https://github.com/sefinek/cloudflare-ip-ranges
A repository with a list of Cloudflare IP addresses updated every 5 hours.
https://github.com/sefinek/cloudflare-ip-ranges
cloudflare cloudflare-ip cloudflare-ips cloudflare-ipv4 cloudflare-ipv6 cloudflareip
Last synced: 3 months ago
JSON representation
A repository with a list of Cloudflare IP addresses updated every 5 hours.
- Host: GitHub
- URL: https://github.com/sefinek/cloudflare-ip-ranges
- Owner: sefinek
- License: mit
- Created: 2025-04-27T02:13:54.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-16T20:32:21.000Z (4 months ago)
- Last Synced: 2025-06-26T17:11:41.438Z (3 months ago)
- Topics: cloudflare, cloudflare-ip, cloudflare-ips, cloudflare-ipv4, cloudflare-ipv6, cloudflareip
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare IP Ranges
A simple script to automatically download and update the list of Cloudflare IP addresses (IPv4 and IPv6).## 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
```bash
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
```bash
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)
```conf
real_ip_header CF-Connecting-IP;
include /etc/nginx/cloudflare_ips.conf;
```## License
MIT