Google Cloud Platform uses a large range of IP addresses, which change over time. For historical reasons, Google Cloud Platform publishes its list of public IP addresses in an SPF record for _cloud-netblocks.googleusercontent.com
.
When you need the literal IP addresses for Google Cloud Platform, use one of the common DNS lookup commands (nslookup
, dig
, host
) to retrieve the TXT records for the domain _cloud-netblocks.googleusercontent.com
:
$ nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
This returns a list of the domains included in Google's SPF record, such as:
_cloud-netblocks1.googleusercontent.com, _cloud-netblocks2.googleusercontent.com, _cloud-netblocks3.googleusercontent.com
Next, look up the DNS records associated with those domains, one at a time:
$ 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
The results of these commands contain the current range of addresses.
I hope this helps.
Sincerely,
George