Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

All incoming connections seem to be refused on my Fedora machine, except on port 80 with apache.

The ports I have tried are 8111 and 1111, neither does work. I have done the forwarding on my hardware router and configured the firewall (iptables, using the GUI) to allow connections on those ports. However, it is still not working.

When I run a small HTTP server (the node.js hello-world) on one of these ports and try to curl it, it only works on localhost but not with the public ip address.

Using the public address, I immediately get curl: (7) couldn't connect to host.

Without the port forwarding or the firewall exception, this takes a while and does not appear immediately - so i think that that's not the problem. I also tried using the web browser instead of curl, without any difference.

I have tried a tool named tcptrack, which shows this whenever I try to curl using the public address (I changed the public address here, is the local one):      RESET        16s    0 B/s    RESET        16s    0 B/s

So I am receiving the packages but they are rejected somehow (I don't know exactly what RESET means). Is there another firewall or something? Like I said, port 80 works fine.

share|improve this question
up vote 1 down vote accepted

How are you running this webserver? It seems like it's only listening to localhost, and not to your actual ip address. So it will only accept connections comming from localhost (

Try binding it to (or instead of localhost.

So if you're starting it like this:

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '');

change to

share|improve this answer
thank you!! how could i forget this? :D – wst Sep 5 '12 at 16:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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