An open API service indexing awesome lists of open source software.

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.

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