can not access Azure VM thru port 8888

979 Views Asked by At

I set up an Azure ubuntu VM, created the network security group, added port 80 and 8888 rules. firewall is inactive. associated nsg to the subnet of the VM. Not able to remote connect to port 8888, but telnet to port 80 ok, and port 8080 also ok, even though there is no rule allowing 8080. I experimented and removed port 80 inbound rule, but still can access port 80.

netstat -ant | grep 8888 shows one process is listening tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN

It just appears that the access is not following my inbound rules but obeying some default. What can it be doing?

2

There are 2 best solutions below

1
On BEST ANSWER

As you said, your service is listening on 127.0.0.1, the service is only accessed inside VM.

You should set your service listen on 0.0.0.0 or VM's private IP.

1
On

Four reasons:

  1. Firewall on VM level.
  2. No application listening on said ip\port.
  3. Network security group attached to the vm\subnet blocking traffic.
  4. Azure Firewall (highly unlikely, preview feature).

You appear to be rocking case number 3. How to edit NSG.