Created
March 5, 2018 16:47
-
-
Save justinholmes/78de0d095d2502257246872f84e40db1 to your computer and use it in GitHub Desktop.
Script to get Google Cloud IPv4 external address blocks
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
dig TXT _cloud-netblocks{1..6}.googleusercontent.com +short | grep ip4 | awk -F 'ip4:' '{for (i=2; i<=NF; i++) print $i}' | sed 's/\?all//g' | sed 's/ip6:.*//g'| sed 's/\"//g' | sed 's/^ *//;s/ *$//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment