mirror of
https://github.com/lord-alfred/ipranges.git
synced 2026-07-04 19:21:55 +00:00
343b3ed25b
Signed-off-by: Gavin D. Howard <gavin@gavinhoward.com>
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
|