简体   繁体   English

无法打开 Azure 虚拟机端口

[英]Can't open Azure VM Port

I'm trying to open port 8080 on an Azure VM so that I can access SSAS through Power BI from my local computer.我正在尝试在 Azure VM 上打开端口 8080,以便我可以从本地计算机通过 Power BI 访问 SSAS。 I have added an inbound rule to the.network security group on azure portal as per https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal and I've also added an inbound rule on the firewall of the VM itself.根据https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal ,我已将入站规则添加到 azure 门户上的 .network 安全组,并且我还添加了VM 本身的防火墙上的入站规则。

However, when I go to canyouseeme.org it can't see port 8080.但是,当我 go 到 canyouseeme.org 时,它看不到端口 8080。

Any ideas what I'm doing wrong?知道我做错了什么吗?

You also have to make sure that the firewall running on the virtual machine itself is disabled, or allows the specific ports you are interested in.您还必须确保虚拟机本身上运行的防火墙已禁用,或者允许您感兴趣的特定端口。

See here: https://wiki.u-gov.it/confluence/display/SCAIUS/How+to+disable+firewall+inside+a+linux+virtual+machine看这里: https://wiki.u-gov.it/confluence/display/SCAIUS/How+to+disable+firewall+inside+a+linux+virtual+machine

According to your description, I suggest you could check as the following steps:根据您的描述,建议您按照以下步骤进行检查:

1.Check Azure VM NSG, port 8080 should be open. 1.检查Azure VM NSG,应该打开8080端口。

在此处输入图像描述

Note: The link you provided is open port on .net su.net, You also need open port on VM's nic.注意:您提供的链接是 .net su.net 上的开放端口,您还需要在 VM 的网卡上开放端口。

2.Open port on your VM's Windows Firewall. 2.在您的虚拟机的 Windows 防火墙上打开端口。

3.Port 8080 should be listening on your VM. 3.端口 8080 应该在您的 VM 上侦听。 You could use netstat -ant|findstr 8080 to check it.您可以使用netstat -ant|findstr 8080来检查它。 If it is not listening, maybe you need check your configuration.如果它没有在监听,也许您需要检查您的配置。 This link maybe helpful.链接可能有帮助。

Note: The port should listen on 0.0.0.0 .注意:该端口应侦听0.0.0.0 If it is listening on 127.0.0.1 , it only could access inside VM.如果它正在监听127.0.0.1 ,它只能访问 VM 内部。

1)Go to VM & open desired port in local firewall setting 1)转到VM并在本地防火墙设置中打开所需的端口

Control Panel\System and Security\Windows Defender Firewall控制面板\系统和安全\Windows Defender 防火墙

click link -Advanced settings->Inbound rules ->New Rules点击链接-高级设置->入站规则->新建规则

select Port option and add your desired port select 端口选项并添加您想要的端口

2)Also On azure, In VM.networking, whitelist the port 2)同样在 azure 上,在 VM.networking 中,将端口列入白名单

3 ).netstat -ant|findstr 3).netstat -ant|findstr

Above steps worked for me.以上步骤对我有用。

The solution was to redeploy the VM after opening the ports on the Azure portal.解决方案是在 Azure 门户上打开端口后重新部署 VM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM