🔨 List all IP ranges from: Google (Cloud & GoogleBot), Bing (Bingbot), Amazon (AWS), Microsoft, Oracle (Cloud), GitHub, Facebook (Meta), OpenAI (GPTBot) and other with daily updates.
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.
 
 

22 lines
557 B

#!/bin/bash
# https://docs.digitalocean.com/products/platform/
# From: https://github.com/nccgroup/cloud_ip_ranges
set -euo pipefail
set -x
# get from public ranges
curl -s https://www.digitalocean.com/geo/google.csv | cut -d, -f1 > /tmp/digitalocean.txt
# save ipv4
grep -v ':' /tmp/digitalocean.txt > /tmp/digitalocean-ipv4.txt
# save ipv6
grep ':' /tmp/digitalocean.txt > /tmp/digitalocean-ipv6.txt
# sort & uniq
sort -V /tmp/digitalocean-ipv4.txt | uniq > digitalocean/ipv4.txt
sort -V /tmp/digitalocean-ipv6.txt | uniq > digitalocean/ipv6.txt