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, 192.168.0.3: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 192.168.0.3 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, 192.168.0.3 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?


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


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

server.listen(80, 'current_local_ip');

First, you need to add C:\Program Files (x86)\node to the list of trusted applications in your firewall.

Then, in your node app, you can write:

listen(3333, '172.24.14.26', function() {

or:

listen(3333, '0.0.0.0', function() {

or:

listen(3333, function() {

or:

listen(80, '172.24.14.26', function() {

or:

listen(80, '0.0.0.0', function() {

or:

listen(80, function() {

Each one of these 6 combinations work in my case: node.js on Windows Server 2016, protected by a company proxy.


Doing following worked for me on a windows PC. Try this : open

Control Panel\System and Security\Windows Defender Firewall\Allowed apps

Next look for node.js in the list and click change settings > Make sure private access is checked and then click ok.