Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from May 6 '13 at 0:42

This question came from our site for professional and enthusiast programmers.

Firstly, the site address. Try on SuperUser or ServerFault. – H2CO3 May 5 '13 at 13:29
I checked : % sudo telnet x.x.x.x 6311 same problem... – sunny May 5 '13 at 13:33
It's not a web server there, it is RServe.. Then I don't have any site address... – sunny May 5 '13 at 13:36
up vote 2 down vote accepted

The problem was with the service ( that was running on 6311) The servise just was not configured to work with remote access.

It means, telnet was OK :)

share|improve this answer

Check what IP server is listening to. I am suspecting that your server is listening to localhost or Make it listen to (probably via some conf file).

You can verify it by running

netstat -tapnl | grep 6311

Check if it shows or

share|improve this answer
If this answer solves your problem, you can mark this as accepted answer.. :) – anishsane May 14 '13 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .