Created
July 26, 2016 13:27
-
-
Save jayswan/6bbd0511584a1957f481ed9dae6ab61f to your computer and use it in GitHub Desktop.
Scripts to retrieve CIDR blocks for various services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fastly | |
curl -s https://api.fastly.com/public-ip-list | jq -r '.addresses | .[]' | |
dig @8.8.8.8 +short txt _netblocks.google.com | awk '{gsub("ip4:","");for (col=2; col<NF;++col) print $col}' | |
# AWS | |
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | \ | |
jq --raw-output '.prefixes | map(.ip_prefix) | .[]' | |
# Tor | |
curl -s https://check.torproject.org/exit-addresses \ | |
| awk '/ExitAddress/ {print $2}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment