无法访问 Azure 文件共享 |端口 445

Azure file shares could not be accessed | Port 445

我已经设置了 Azure 存储文件,我在我的开发机器中添加了一些防火墙规则来打开端口#445。但我现在无法访问我的文件共享。它也不响应 ping 命令。

但我能够从 Azure VM IaaS 服务器访问相同的文件共享。我错过了什么吗?

参考GitHub文章中提到的建议

通过端口 445 在本地安装共享的一种替代方法是 Azure 文件同步,它使您能够在本地 Windows 服务器上创建 Azure 文件共享的缓存。 Azure 文件同步仅通过 Azure 文件 HTTPS(使用文件 REST API)发送数据。您可以在此处了解有关 Azure 文件同步的更多信息:https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-planning

您能否从 Azure 中的 VM 安装该驱动器,以确保文件共享没有问题?事实上,如果可以的话,我会在不同区域的 VM 上进行尝试,这将确认 SMB 3.0 是否正常工作。

Troubleshooter for Azure Files storage problems

如果以上内容对您有帮助,或者您在这个问题上需要进一步的帮助,请告诉我们。

如果问题仍然存在,请分享错误消息的屏幕截图

不建议直接使用 PING 命令来验证到 public DNS 名称或 IP 地址的网络连接,因为通常 PING 是被禁止的。您可以使用 PowerShell 命令 Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net 来验证开发机器上的端口 445。

如果此 TCP 445 连接失败,您可以正确检查 ISP 或您的本地网络安全性未阻止出站端口 445。请注意,您应该打开出站端口而不是入站端口 445。

作为测试结果,在我的本地机器上,TCP 测试端口 445 是错误的。

在Azure VM上,TCP测试端口445为真,我可以成功访问存储文件共享。

另外,445端口一直不允许上网。你可以使用 different ways to access files in Azure Files.

You can mount the file share on your local machine by using the SMB 3.0 protocol, or you can use tools like Storage Explorer to access files in your file share. From your application, you can use storage client libraries, REST APIs, PowerShell, or Azure CLI to access your files in the Azure file share.