1

I have a Node.js API on which I have been working for a while, and I am trying to deploy it on my server.

Locally, I have been able to run it without any problem, with node version v0.10.32

$ sudo netstat -ntlp | grep LISTEN
tcp   0   0  0.0.0.0:80         0.0.0.0:*         LISTEN      19091/nginx
tcp   0   0  0.0.0.0:3333       0.0.0.0:*         LISTEN      12594/node
tcp   0   0  127.0.0.1:27017    0.0.0.0:*         LISTEN      22091/mongod

I upload the project on my server (same node version), no error is shown in the logs, the process seems to listen on port 3333. But when I do domain.name:3333, I get no answer. As you can see above, the node process is listening on 0.0.0.0 interface, so it doesn't seem to be the problem.

domain.name:80 works fine, nginx is well responding.

$ nmap domain.name
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
80/tcp   open  http
3333/tcp open  dec-notes
$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

The nmap from the outside (my personal computer) is not displaying the port 3333 though

Do anyone know where the problem is from?

2
  • I guess the server's firewall settings? Commented Oct 4, 2014 at 7:21
  • @JohnZwinck Nope, if you look at the iptables, there's absolutely no rule, so that means it accepts everything. But I managed to resolve it, it was a simple oversight. If you're interested, I posted an answer. Thanks! Commented Oct 4, 2014 at 7:39

1 Answer 1

1

Finally found what the problem was.

I had to change bind settings in /etc/bind/named.conf.options

It was listening on 127.0.0.1 only. To resolve this problem, just change the following line:

listen-on { 127.0.0.1; };

to

listen-on { any; };
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.