Allow socket connection in Solaris

portsocketsolaris

I have 2 solaris machines and I have an application that opens a socket via port 8556, but for some reason the connection keeps getting refused.

When I run a netstat command on the second server (serverb):

$ netstat -an | grep 8556
127.0.0.1.8556             *.*                0      0 128000      0 LISTEN

Which seems to indicate the port is open, I can even telnet to the localhost:

$ telnet 127.0.0.1 8556
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
^]

But when I try to telnet from the first machine, the connection fails:

bash-3.00# telnet serverb 8556
Trying 5.5.112.112...
telnet: Unable to connect to remote host: Connection refused

I can ssh successfully from servera to serverb, but the socket connection is refused. I have tried the hostname and the ip address, but no luck. Also i can telnet to port 22 and and 23 from servera to serverb, and these ports appear to be open, its just a problem with port 8556.

What could be the problem here?

Best Answer

The listening socket is bound to 127.0.0.1, as your netstat output shows. It is not bound to 5.5.112.112 or 0.0.0.0 (which acts as a wildcard).