Azure Network Security Group - Inbound - Ports Not working

Solution 1:

According to your description, it seems that your service is not listening or listening on 127.0.0.1.

You could use netstat -ant|grep <port>. The result should be like below:

tcp        0      0 0.0.0.0:<port>              0.0.0.0:*               LISTEN 

The service could not listen on 127.0.0.1. It should be listening on 0.0.0.0 or VM private IP(such as 10.0.0.4).

You could check inside your VM, curl 127.0.0.1:<port>. Please ensure it could provide service.