Cloudflare
The cipr cloudflare command retrieves IP ranges for Cloudflare.
Usage
CLI command
cipr cloudflare [flags]
Data Format
See the Cloudflare command data format for output fields.
Flags
| Flag | Description | Required |
|---|---|---|
--ipv4 | Get only IPv4 ranges. | ❌ |
--ipv6 | Get only IPv6 ranges. | ❌ |
When neither --ipv4 nor --ipv6 is set, both are fetched.
Source and caching
Cloudflare uses separate configured source keys for each address family, with these default settings:
cloudflare_ipv4_endpoint = "https://www.cloudflare.com/ips-v4/"
cloudflare_ipv4_local_file = ""
cloudflare_ipv4_cache_ttl = "24h"
cloudflare_ipv6_endpoint = "https://www.cloudflare.com/ips-v6/"
cloudflare_ipv6_local_file = ""
cloudflare_ipv6_cache_ttl = "24h"
Use cipr configure cloudflare_ipv4 and cipr configure cloudflare_ipv6 to inspect the effective values. Each source is a plain-text list containing one CIDR per line. A custom URL or local file supplied through --source is used as a single combined source and must use that format.
Use --no-cache when a run must fetch the current lists instead of valid cached responses.
Examples
tip
IP ranges in the output examples are snapshots and might not be current.
Get all Cloudflare IPv4 ranges
CLI command
cipr cloudflare --ipv4
Output
...
188.114.96.0/20
197.234.240.0/22
198.41.128.0/17
...
Get all Cloudflare IPv6 ranges
CLI command
cipr cloudflare --ipv6
Output
...
2803:f800::/32
2405:b500::/32
2405:8100::/32
...