Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created October 10, 2018 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/e29ceec9239851bc2cddd35f5908fc20 to your computer and use it in GitHub Desktop.
Save jpluimers/e29ceec9239851bc2cddd35f5908fc20 to your computer and use it in GitHub Desktop.
google_ips=$(for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`; do dig txt $LINE +short; done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n | xargs | tr " " ",") ; echo IPs: ; echo $google_ips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment