You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
349 B
17 lines
349 B
#!/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
|
|
|