Nicolai
By:
Nicolai

Deployd (Node.js) only accepts local connections

July 18, 2015 1.1k views
Networking Node.js Deployment MongoDB Firewall

I cannot not connect to my deployd server externally on 45.55.183.253:5000. I can connect to it locally with no problems.

I am running the ubuntu 12.04 image.

A netstat -ntap shows the following:

tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      8906/nodejs 

The code used for the server is taken from the documentation. I have tested with adding both port and server location in .listen(). The script is run with forever. But I have also tested with just running the script with node.

I have also tested with the test server from the node.js page, with the port as the only argument in listen(). Still with no luck.

Is there any configuration that I need to do to allow the server to be accessed externally? Any help would be very much appreciated.

1 Answer

Judging from the netstat output provided, it appears as if the application is correctly listening on port 5000 on all network interfaces. If you are still not able to connect to the app, the first step in troubleshooting the issue would be to review any firewalling rules you may have put in place. For example if you are using UFW to manage IPtables, make sure that you have opened port 5000:

  • sudo sudo ufw allow 5000/tcp
by Shaun Lewis
Learn how to setup a firewall with UFW on an Ubuntu / Debian cloud server.
Have another answer? Share your knowledge.