I tried this solution:
iptables -I OUTPUT -p tcp --dport 2195 -j ACCEPT
/etc/init.d/iptables stop
/etc/init.d/iptables start
but still can't access the port.
If there are more ports that I have to open for APNS let me know.
I tried this solution:
iptables -I OUTPUT -p tcp --dport 2195 -j ACCEPT
/etc/init.d/iptables stop
/etc/init.d/iptables start
but still can't access the port.
If there are more ports that I have to open for APNS let me know.
how about:
iptables -A INPUT -p tcp --dport 2195 -j ACCEPT
service iptables restart
This may help too.
-HTH
It didnt work for me completely, since my last rule was DROP ALL which basically negated all i added to iptables after
It might be useful to use -I switch iptables -I INPUT 1 -p tcp --dport 2195 -j ACCEPT 1 - means 1st rule instead of appending, to put rule in front of drop all
See my anwser here: https://stackoverflow.com/a/25229943/1472048
For CentOS 7, you should use "firewall-cmd" command like so:
firewall-cmd --add-port=2195/tcp --permanent
iptables is not recommended if you use the firewalld service.
Try the following command, it worked for me:
$ sudo iptables -A INPUT -p tcp --jport 2195 -j ACCEPT
$ sudo /etc/init.d/iptables save