I have 2 dedicated servers
Server A has a php script running a socket server on port 9000
I can login to server a and run >telnet 127.0.0.1 9000
and access the socket connection perfectly
Now if I try and login to Server B and do >telnet 1.1.serverAIP.1 9000
i either get connection refused error or "no route to host"
I have disabled all firewalls on both servers, so those ports are not being blocked by the firewall.
The socket server script is very simple.
$listenfd = socket_create(AF_INET, SOCK_STREAM, 0);
if ($listenfd)
print "Listening on port " . PORT . "\n";
else
die("AIEE -- socket died!\n");
socket_setopt($listenfd, SOL_SOCKET, SO_REUSEADDR, 1);
if (!socket_bind($listenfd, "0.0.0.0", PORT))
{
socket_close($listenfd);
die("AIEE -- Couldn't bind!\n");
}
socket_listen($listenfd, LISTENQ);
///then a while loop to keep listening.
My question is this: Is there anything special I need to do script-wise to make this socket server accessable outside the localhost?