0

I'm trying to open several ports on Azure. I have a single VPS with a single network security group with a single virtual network and subnet. Everything seems to be configured correctly, check images:

enter image description here

enter image description here

But trying to ping any port, for instance 8080:

nc -zv 52.166.131.228 8080
nc: connect to 52.166.131.228 port 8080 (tcp) failed: Connection refused

running desperate here, I've followed the guidelines to no avail https://learn.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-nsg-quickstart-portal ...any idea what I'm missing??

Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
AlejandroVK
  • 7,373
  • 13
  • 54
  • 77
  • Could you try to use nestat -ant to check whether you port is listening. If possible, give me the result. Please ensure you could telnet 127.0.0.1 8080 – Shui shengbao Dec 25 '16 at 12:28
  • Hi, please ensure your port listening on tcp not tcp6. – Shui shengbao Dec 25 '16 at 12:45
  • Hi @Walter-MSFT have a postgreSQL server at tpc listeningn at 5432, here is the output of a netstat tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 962/postgres – AlejandroVK Dec 25 '16 at 21:57
  • Hi, I don't find 8080 is listeng. Please ensure 8080 is listening If you want to access it. – Shui shengbao Dec 25 '16 at 23:37
  • You could access to port 962 but not access to port 5432 because the port is listening only on 127.0.0.1. Only 127.0.0.1 could access to port 5432. – Shui shengbao Dec 26 '16 at 02:24

1 Answers1

2

According to your error, I think you should check your service firstly. I don’t find 8080 is listening according to your output.

Please ensure port 8080 is listening, you could try to use telnet for test in your VM firstly.

telnet 127.0.0.1 8080

Notes: NSG could associate to VM and subnet.

Please refer to this article about how to manage NSG

I notice that your port 5432 is only listening on 127.0.0.1. I think you should check your configuration. If you want to access port 5432 with public IP, the port should listening on 0.0.0.0

Shui shengbao
  • 18,746
  • 3
  • 27
  • 45