Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IP address for Google Cloud Messaging server

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!

like image 514
Dave Avatar asked Jul 13 '12 17:07

Dave


People also ask

Do cloud servers have IP addresses?

Cloud providers and data centers have a limited pool of IP addresses that they own, and they often re-use previously assigned IPs in order to maximize them. You can't simply move your existing IP addresses along with your services. Rather, you'll receive a dynamically assigned internal and external IP address.

Does Google have one IP address?

www.google.com and google.com are two different hostnames. They have different A records in DNS and they can have different IP addresses, or multiple IP addresses assigned to them. There is no rule that www and non-www hostnames need to go to the same server or IP.


3 Answers

I have found that the IP ranges for android.googleapis.com are not published.

like image 121
Dave Avatar answered Oct 02 '22 14:10

Dave


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
like image 35
John Mellor Avatar answered Oct 02 '22 13:10

John Mellor


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
like image 44
Chiggins Avatar answered Oct 02 '22 13:10

Chiggins