1

I opened port 5887 and 22 in iptables on my redhat 6 box. When I telnet ip port 22, I get a connection but won't get connection for 5887.

I actually disabled iptables and seLinux just to be sure they are not causing this but still getting connection failed.

Any ideas?

 ~]# netstat -anp | grep -w LISTEN
 tcp        0      0 127.0.0.1:42012             0.0.0.0:*                        LISTEN      1780/jsvc.exec
 tcp        0      0 127.0.0.1:65443             0.0.0.0:*                   LISTEN      1528/nailsd
 tcp        0      0 0.0.0.0:37349               0.0.0.0:*                   LISTEN      1066/rpc.statd
 tcp        0      0 10.1.1.91:9997              0.0.0.0:*                   LISTEN      1780/jsvc.exec
 tcp        0      0 127.0.0.1:9999              0.0.0.0:*                   LISTEN      1780/jsvc.exec
 tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1042/rpcbind
 tcp        0      0 0.0.0.0:55443               0.0.0.0:*                   LISTEN      1549/nailswebd
 tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1314/sshd
 tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1173/cupsd
 tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1418/master
 tcp        0      0 10.1.1.91:8443              0.0.0.0:*                   LISTEN      1780/jsvc.exec
 tcp        0      0 127.0.0.1:8443              0.0.0.0:*                   LISTEN      1780/jsvc.exec
  • 4
    Do you have a daemon process running on port 5887? You might want to add the output of netstat -anp | grep -w LISTEN to your question. – Stephen Harris Aug 18 '16 at 2:57
  • I just did. Also, I have a web console using 8443 and netstat shows it is listening but I still cant telnet even 8443. I am only able to telnet 22. @StephenHarris – Lolu911 Aug 18 '16 at 14:18
  • Does telnet 8443 work from localhost? – user1700494 Aug 18 '16 at 14:29
  • Like @StephenHarris alludes to, you have no processes listening on 5887 – I_GNU_it_all_along Aug 18 '16 at 14:30
2

There is nothing (no daemon or process) listening on port 5887.

netstat -anp | grep -w LISTEN | grep 5887

This won't display anything based on the output you just provided.

You can test this by using netcat to listen on 5887/tcp:

netcat -l 5887

Then run:

netstat -anp | grep -w LISTEN | grep 5887

You should now see the netcat process is listening. You will also be able to establish a telnet connection to it to prove your firewall isn't blocking the connection.

| improve this answer | |
  • you are right. I am working with support team of the application to sort this out. Thanks. – Lolu911 Aug 18 '16 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.