Last active
July 23, 2020 02:49
-
-
Save IAmStoxe/60d2921b4507bb683a4e3ce1976e71e2 to your computer and use it in GitHub Desktop.
How to query the current IP ranges of google cloud platform
This file contains hidden or 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
| #!/bin/bash | |
| { | |
| nslookup -q=TXT _cloud-netblocks1.googleusercontent.com 8.8.8.8 | |
| nslookup -q=TXT _cloud-netblocks2.googleusercontent.com 8.8.8.8 | |
| nslookup -q=TXT _cloud-netblocks3.googleusercontent.com 8.8.8.8 | |
| nslookup -q=TXT _cloud-netblocks4.googleusercontent.com 8.8.8.8 | |
| nslookup -q=TXT _cloud-netblocks5.googleusercontent.com 8.8.8.8 | |
| } | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\/[0-9]\{1,\}' | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment