Apple Push Notifications and Port 2195

11,033

You only need port 2195 to be open for outbound connections (and also port 2196 for the Feedback Service).

You don't have to open any port for inbound connections, since Apple doesn't initiate the connection to your server - your server initiates the connection to Apple.

Share:
11,033
AxiomaticNexus
Author by

AxiomaticNexus

Updated on June 12, 2022

Comments

  • AxiomaticNexus
    AxiomaticNexus almost 2 years

    I'll be using JavaPNS to implement my server side of things of the push notification service. I don't have control over what ports are open on the server, but assuming that all ports are open for outbound connections, do I have to also open port 2195 for inbound connections? Correct me if I'm wrong, but my understanding of TCP is that when I make the connection with the Apple server, a source port is randomly assigned to any port not being used and when the Apple server responds (the inbound connection), it will come through that source port. So, my theory is that port 2195 does not need to be open for inbound connections. Is that right?

    Also, if the response comes through the random port, doesn't that mean that that port needs to be open to inbound connections? How does the firewall manage this since only a few ports will be indefinitely open for inbound connections? Does it leave the random port open only temporarily for this specific request-response session?