How to Open Port 2195 in Iptables Centos 6 for Activating the Apns

How to open port 2195 in iptables CentOS 6 for activating the APNS

How about:

iptables -A INPUT -p tcp --dport 2195 -j ACCEPT
service iptables restart

This may help too.

How can I use iptables on centos 7?

With RHEL 7 / CentOS 7, firewalld was introduced to manage iptables. IMHO, firewalld is more suited for workstations than for server environments.

It is possible to go back to a more classic iptables setup. First, stop and mask the firewalld service:

systemctl stop firewalld
systemctl mask firewalld

Then, install the iptables-services package:

yum install iptables-services

Enable the service at boot-time:

systemctl enable iptables

Managing the service

systemctl [stop|start|restart] iptables

Saving your firewall rules can be done as follows:

service iptables save

or

/usr/libexec/iptables/iptables.init save

IP Address ranges for APNS servers?

From Apple's documentation (emphasis on the interesting bit added):

Push providers, iOS devices, and Mac computers are often behind firewalls. To send notifications, you will need to have TCP port 2195 open. To reach the feedback service, you will need to have TCP port 2196 open. Devices and computers connecting to the push service over Wi-Fi will need to have TCP port 5223 open.

The IP address range for the push service is subject to change; the expectation is that providers will connect by hostname rather than IP address. The push service uses a load balancing scheme that yields a different IP address for the same hostname. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.

17.0.0.0/8 is CIDR notation for 17.0.0.1 to 17.255.255.254.

Can't open web application from server URL

If anyone lands on this page in the future, I just want to let you know that Will was indeed right, the given port wasn't open on the server. But instead of just opening it and make it available to the World Wide Web to do anything with it, I instead putted a reverse proxy in place.

stream_socket_client unable to connect (connection timed out)

I had fixed the issue by opening the port 2195 on the production server. You can verify by following command $telnet gateway.push.apple.com 2195

-bash-3.2# telnet gateway.push.apple.com 2195

Trying 17.149.38.141...
Connected to gateway.push.apple.com (17.149.38.141).
Escape character is '^]'.
Connection closed by foreign host.


Related Topics



Leave a reply



Submit