IP address for Google Cloud Messaging server

风格不统一 提交于 2019-12-23 12:27:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!