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
Linux: Screen Desktop Video Capture Over Network, and Vnc Framerate
Changing Highlight Line Color in Emacs
Gcc Verbose Mode Output Explanation
How to Check Internet Access Using a Bash Script on Linux
Setting Up Permissions for Wordpress on Amazon Ec2 (Amazon Linux)
What Context Does the Scheduler Code Run In
Pass Parameter to an Awk Script File
How to Get the Variable Value Inside the Eof Tags
How to Clear the Scrollback in the Screen Command
In a Linux Shell How to Process Each Line of a Multiline String
Docker Ignores Limits.Conf (Trying to Solve "Too Many Open Files" Error)
Openssh Client Hangs on Logout When Forwarding X Connections
How to Develop Linux Screen Saver
How to Configure Curl to Only Show Percentage