1

Created a Ubuntu 14.04 LTS VM in Azure Resource Management Group (ARM). Added few ports to Inbound security rules (for example 9220, 6789, 6980), out of these ports, only 9220 (along with default enabled ports - 22, 80) is working and all other ports are not working. NSG is perfectly associated with the NIC & subnet, no luck and even created a new NSG & associated with same NIC & subnet, still no luck. Ubuntu Firewall is disabled by default.Screenshot of NSG

2 Answers2

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.

Shui shengbao
  • 3,503
  • 1
  • 10
  • 20
0

Navigate to your VM network card, select Effective Security Rules and check what's in there, just to make sure your rules are applied. After that, check your Linux box for open ports

netstat -tulnp | grep <port no>
Bruno Faria
  • 3,804
  • 1
  • 11
  • 18