0

We are building a mobile app which will be sending push noticiation to our clients.

But as per port numbers given in documention we tried but Unable to telnet on google cloud messaging (android.googleapis.com) on port numbers 5228 - 5230

However if we telnet on android.googleapis.com on 443 works.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89

2 Answers2

1

If you can telnet to port 443, but not to ports 5228-5230, it is likely that connections to these ports are blocked by your network infrastructure / firewall. The best path to proceed would be to contact your network administrator and let them know you need to be able to open outbound connections to these ports.

Something else to keep in mind is that GCM is not necessarily using that specific host - in fact, it probably is not. You may potentially need to communicate on ports 5228-5230 to any IP address within Google's ASN 15169 in order to use GCM - it's not possible to verify connectivity to GCM by attempting to connect to any one specific IP address or hostname. The initial request (according to Google's documentation) connects to port 443 on gcm-http.googleapis.com (assuming you're using HTTP), but may use other IP addresses and ports later in the process. Google doesn't document any specific IP addresses that are used, and they may change over time - so it could be any IP address within ASN 15169.

patbarron
  • 1,364
  • 12
  • 17
  • I have worked with our Network team they said they have already opened the firewall for these port numbers. But I was still not able to ping. To test if this port number are really open, I tested from various different networks my home, ATT LTE by hotpots and other WiFi services. But results was same was not able to telnet. – MobileFirst Developer Apr 04 '16 at 15:05
  • I added some additional information to my answer that may help you. – patbarron Apr 04 '16 at 16:07
0

Looked around the community and found some posts that I think can help you. This answer, which mentions newer versions of Android fall back to using port 443 (the standard HTTPS port) which most firewalls allow traffic through by default.

I got to it by finding this post on Which port and protocol does Google Cloud Messaging (GCM) use?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
AL.
  • 36,815
  • 10
  • 142
  • 281