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

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.

2
  • Hi @Walter - MSFT, Yes you are right, it is listening to 127.0.0.1. Where should I change this? Connecting ports (9220) is listening at 0.0.0.0 – Murugan Durai Jul 7 '17 at 7:21
  • @MuruganDurai It depends on your service. You could search it on google. – Shui shengbao Jul 7 '17 at 7:22
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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.