0

I am able to SSH into my Azure VM. However, neither NGINX on port 80 nor dockerized ASP.NET Core on port 5000 are accessible. I've added security endpoint "allow" in the Azure portal config.

From within SSH session, using lynx to access localhost:80 and localhost:5000 works as expected

Docker container starting with:

docker run -t --rm -p 5000:5000 *imagename*

I attempted to modify IPTABLES with this recommendation apache not accepting incoming connections from outside of localhost but doing so still shows "0 pkts" when doing iptables -vL

Screenshot of the Azure rule configuration:

Azure inbound rules

I've also added the port 80 outbound rule as Rem has suggested, but so far this has not helped.

Community
  • 1
  • 1
Malachi
  • 2,260
  • 3
  • 27
  • 40
  • Can you please edit your question to show how you set up your inbound security rules? All you said was you added a "security endpoint allow" and that's not clear at all. – David Makogon Jul 02 '16 at 02:20
  • Added screenshot, hopefully this adds clarity. – Malachi Jul 06 '16 at 00:04
  • I've resorted to the most obvious, hammer-and-nail workaround. I've an old P4 dedicated server lounging around which now forwards requests via SSH to the Azure server. Please, liberate me from this horror ! – Malachi Jul 13 '16 at 00:07

3 Answers3

1

Finally found the answer.

enter image description here

Circled area (source port range) I had as 80. Setting this instead to * solves the issue and now external connections to 80 work. 5000 still does not, but I expect that's a docker binding issue as Neil suggests and I'm specifically using nginx to proxy the docker container anyway.

Malachi
  • 2,260
  • 3
  • 27
  • 40
0

Inside your Azure VM setting you should go to Network Security group -> and set Inbound security rules like this:

1000 default-allow-ssh Any Any SSH (TCP/22) Allow
…
1010 web Any Any HTTP (TCP/80) Allow
1020 web Any Any HTTP (TCP/5000) Allow
…

I also has outbound security rules:

  100 http Any Any Custom (ANY/80) Allow
…
Roman Kolesnikov
  • 11,777
  • 11
  • 44
  • 67
0

Are nginx and your docker container binding on localhost or 0.0.0.0 or some other network interface?

Neil Sant Gat
  • 857
  • 6
  • 10
  • nginx is the stock-standard setup at the moment. I think that defaults to externally accessible. You can see the docker container configuration in the original post - – Malachi Jul 10 '16 at 03:38