问题
I'm about to roll out an implementation of GCM on a server and need to open the appropriate firewalls by IP.
Does anyone know where I can find the IP address range for android.googleapis.com ?
Thanks!
回答1:
I have found that the IP ranges for android.googleapis.com are not published.
回答2:
According to https://developers.google.com/cloud-messaging/http:
GCM doesn't provide specific IPs, so you should allow your firewall to accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169.
And a ServerFault question links to the following lists of IP ranges contained within ASN 15169:
- IPv4: http://bgp.he.net/AS15169#_prefixes
- IPv6: http://bgp.he.net/AS15169#_prefixes6
回答3:
This may or may not be what you want, but you can just run "nslookup android.googleapis.com" from cmd (Windows) or bash (*nix). My results are:
nslookup android.googleapis.com
Server: UnKnown
Address: 192.168.1.130
Non-authoritative answer:
Name: googleapis.l.google.com
Addresses: 2001:4860:b007::5f
74.125.142.95
Aliases: android.googleapis.com
来源:https://stackoverflow.com/questions/11475375/ip-address-for-google-cloud-messaging-server