3 ms·
If useful here is a function for getting google cloud IP's. get_google() { for line in $(dig +short txt _cloud-netblocks.googleusercontent.com | tr
by LinuxBender 3y ago
If useful here is a function for getting google cloud IP's.
get_google()
{
for line in $(dig +short txt _cloud-netblocks.googleusercontent.com | tr " " "\n" | grep include | cut -f 2 -d :)
do
dig +short txt "${line}"
done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n | uniq
}
- SushiHippie 3y agoOr use the json files they provide https://support.google.com/a/answer/10026322?hl=en https://support.google.com/a/answer/10026322?hl=en "IP ranges that Google makes available to users on the internet": https://www.gstatic.com/ipranges/goog.json https://www.gstatic.com/ipranges/goog.json "Global and regional external IP address ranges for customers' Google Cloud resources": https://www.gstatic.com/ipranges/cloud.json https://www.gstatic.com/ipranges/cloud.json