avern
avern

Reputation: 4931

Azure Ubuntu VM application only able to connect on port 80

I have an Ubuntu16.04 VM on Azure, and am trying to run a node server on it. When I bind the port to 80, I am able to access it from my browser (http://a.b.c.d:80). However, if I try to instead bind the server to a different port, such as 3300 or 8080, the browser times out when trying to connect to it. (http://a.b.c.d:3300)

I have ensured that:

  1. There exists an inbound security rule for port 3300 in the NSG
  2. The windows firewall of the machine of the browser allows port 3300 (I have even tried temporarily turning it completely off but to no avail)
  3. I am not using an azure load balancer
  4. I am starting node with root privileges
  5. Node is bound to (port, "0.0.0.0")
  6. I am listening on the correct port (I think?) netstat -ant | grep 3300 gives

    tcp6 0 0 :::3300 :::* LISTEN

I have spent a few hours now researching on the internet how to get it to work and tried everything I could find, but to no avail. If anyone has any input i'd be happy to try it out.

Upvotes: 0

Views: 223

Answers (1)

avern
avern

Reputation: 4931

Jason was correct, it was a ufw issue. If anyone comes across this question in the future, I solved it with the command

sudo ufw allow proto tcp from any to any port 3300

Upvotes: 1

Related Questions