mirror of
https://github.com/lord-alfred/ipranges.git
synced 2025-12-19 03:37:47 +00:00
18 lines
349 B
Bash
Executable File
18 lines
349 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# https://www.cloudflare.com/ips/
|
|
|
|
set -euo pipefail
|
|
set -x
|
|
|
|
|
|
|
|
# get from public ranges
|
|
curl -s https://www.cloudflare.com/ips-v4/ > /tmp/cf-ipv4.txt
|
|
curl -s https://www.cloudflare.com/ips-v6/ > /tmp/cf-ipv6.txt
|
|
|
|
|
|
# sort & uniq
|
|
sort -V /tmp/cf-ipv4.txt | uniq > cloudflare/ipv4.txt
|
|
sort -V /tmp/cf-ipv6.txt | uniq > cloudflare/ipv6.txt
|