Skip to content

Instantly share code, notes, and snippets.

@briandemant
Created March 12, 2019 10:33
Show Gist options
  • Save briandemant/3adf0cea70af23ebf3c19366900fe7e0 to your computer and use it in GitHub Desktop.
Save briandemant/3adf0cea70af23ebf3c19366900fe7e0 to your computer and use it in GitHub Desktop.
get current public ip ranges's for google cloud
for x in $(nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8| egrep -o "include:_cloud[-.a-z0-9]*" | cut -c9-);do
nslookup -q=TXT $x 8.8.8.8 | egrep -o 'ip4:[./0-9]*' | cut -c5-
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment