Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm not the most knowledgeable guy ever with networking, but here goes...

I've created an application with NodeJS and I'd like to test the application on my LAN with my family. The application listens on port 1337 for connections and I can access the application fine through my own PC by typing localhost:1337, or even http://joel-pc:1337/ into my browser's address bar.

I will be also be running apache alongside NodeJS, and I can access this fine by typing or http://joel-pc/ into a browser's address bar as long as it's connected to the same network.

Now here's the weird part; If I stop the apache service, change my node application to listen on port 80 (http) insted of 1337, it will be accessible on my pc by typing localhost, or even http://joel-pc into my browser's address bar. However, I still can't access NodeJS on any other PC on my network apart from my own.

I've tried creating an outbound rule within Windows 7 to allow access to port 1337, but I still can't get access to my NodeJS server on any other PC than my own, even if it's listening on port 80. Is there something obvious I'm missing out on here?

share|improve this question

migrated from Apr 14 '13 at 10:29

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

What if, as a test only, you turn off your firewall? – cheesemacfly Apr 11 '13 at 18:17
If I turn off my firewall I can access node perfectly, thank you :) But surely there must be a safer way of doing things? – Joel Murphy Apr 11 '13 at 18:26
Cheers. I flagged it too because I read in another thread that it needs to be flagged by 3 users before any action is taken by a moderator – Joel Murphy Apr 11 '13 at 19:01
The flag I raised has been deemed helpful, so not sure how long it can take! – cheesemacfly Apr 12 '13 at 14:26
Yay it's been migrated now. Thanks again! – Joel Murphy Apr 14 '13 at 13:41

Most likely your node application is binding to the loopback IP address instead of the "all IPs" since this is the default behavior of listen. Specify both port and IP in your call like server.listen(80, ''); and try again.

share|improve this answer
If I do this, I still can't access Node on any other device on my LAN. My code looks something like this:var io = require(''); var express = require("express"); var app = express(); var server = require('http').createServer(app) io = io.listen('80', ''); – Joel Murphy Apr 11 '13 at 18:27
This worked in my case. On some wireless networks localhost works as a string, but in others you have to type it as – Raul Rene Jun 30 '14 at 12:17

Get you current local network IP and, run http server like this:

server.listen(80, 'current_local_ip');
share|improve this answer
this works for me. – psulek Jul 28 '15 at 10:29

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.