I am attempting to run a gulp (node.js) server on port 80. I previously had an Nginx server running fine on this port, and was able to access from the outside. As you can see from the curl command, the server process is running and serving correctly to localhost (I have hostname set to '' in gulp file, and have also tried setting this to ''):

Serving internally

However, when I type the public IP into the browser from a remote machine nothing happens. Likewise when I run a curl on the public IP (so it's not a malformed html/php issue or anything like that) from another machine. Although a curl to the public IP from the machine itself works fine.

Here is a picture of the server process initial output:

gulp server process

What else could be blocking this connection? I haven't added any additional firewalls to the system myself.

iptables -L outputs the following:

Chain ufw-user-input (1 references)
target     prot opt source               destination         
DROP       tcp  --  anywhere             anywhere             tcp dpt:http /* 'dapp_Nginx%20HTTP' */
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
DROP       tcp  --  anywhere             anywhere             tcp dpt:8000
DROP       udp  --  anywhere             anywhere             udp dpt:8000
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     udp  --  anywhere             anywhere             udp dpt:http

So I'm wondering if

DROP tcp -- anywhere anywhere tcp dpt:http /* 'dapp_Nginx%20HTTP' */

Might be the problem, and maybe it's denying more than just Nginx (though surely it should be?)? If so how do I remove this particular deny rule using iptables? If not I'm kind of at a loss for what might be causing the problem.

(I can included the full iptables -L output if anyone feels they need it.)

1 Answer 1


Nevermind, in the end it was the Nginx rule, which I would have thought would be specific to Nginx, but apparently blocked off the whole port, even after port 80 was specifically opened with ufw.

Fixed like this:

iptables -D ufw-user-input 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .