can not access Azure VM thru port 8888

a 夏天 提交于 2019-12-11 19:37:20

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/51413031/can-not-access-azure-vm-thru-port-8888

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!