I try to connect to localhost with telnet:
% telnet localhost 6311
This connection succeed, but when I connect by external IP of my computer, connection fails:
% telnet x.x.x.x 6311
Trying x.x.x.x...
Connected to x.x.x.x
Escape character is '^]'.
Connection closed by foreign host.
What could be wrong?