1

I'm trying to establish a connection to Apple Push Notification Service through a remote machine which runs CENTOS. Unfortunately it seems that the related ports, 2195, 2196 are somewhat blocked.

When I telnet from my local osx it seems to work fine:

$ telnet gateway.sandbox.push.apple.com 2195

Trying 17.149.34.66...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.

However when I telnet from my remote server it gives a timeout error.

So far, I tried to disable the iptables but it hasn't worked.

[root@centos01 ~]# service iptables save
[root@centos01 ~]# service iptables stop

Is there any other component that can block my connection to remote machines on certain ports ?

Thanks, Hadar.

user1421720
  • 61
  • 1
  • 4
  • Possible duplicate of [stream\_socket\_client unable to connect (connection timed out)](http://stackoverflow.com/questions/1769189/stream-socket-client-unable-to-connect-connection-timed-out) – Heitor May 28 '16 at 07:04

1 Answers1

3

CentOS usually has many strict rules in the IP-tables. Try adding rules to allow access to the ports in your server. The idea to 'STOP' the IP-tables on the server is not a good idea at all.

Also CentOS implements SE-Linux that is basically an advanced security enhancement. It is possible that the SE-Linux module is blocking requests.

You may refer to this : http://wiki.centos.org/HowTos/SELinux

Just to test whether your problem is caused by the SE Module, you may want to temporarily disable it's enforcement by doing:

    $ echo 0> /selinux/enforce

Make sure you re enable enforcement after the testing.

    $ echo 1> /selinux/enforce
Madhavan Malolan
  • 719
  • 6
  • 24
  • 1
    It's been a while now. You should "Accept" (green tick) an answer when something works. It will help others searching for the same problem on the internet. – Madhavan Malolan Oct 29 '13 at 09:18