gpt4 book ai didi

azure - 无法将文件共享从 azure 连接到 Windows 笔记本电脑,端口 445 被阻止

转载 作者:行者123 更新时间:2023-12-03 02:14:29 25 4
gpt4 key购买 nike

当我尝试将文件共享连接到我的 Windows 笔记本电脑时,它说端口 445 被阻止。

请帮我解决这个问题。

感谢您的热心帮助。

错误:

if ($connectTestResult.TcpTestSucceeded) {
# Save the password so the drive will persist on reboot
cmd.exe /C "cmdkey /add:`"storagetestmy3.file.core.windows.net`" /user:`"localhost\storagetestmy3`"
/pass:`"ZvWYXdvAkX112rT8k2MxQLqlcDi1oA+EZNNoGeQ2Bv88DDUWFdtcmbXXfKk/mHNMlw1TDVX3Vrkb+AStoh/kOQ==`""
# Mount the drive
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storagetestmy3.file.core.windows.net\fileshare3" -Persist
} else {
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization
or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a
different port."
} : Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not
blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port.
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

enter image description here

最佳答案

根据 MSFT Doc of 445 Port blocked by Windows File Connection to Azure File Share ,

  1. 您的客户端操作系统应支持 SMB 3.0。确保您的 Windows 系统中启用了此 SMB Direct 选项。 enter image description here

  2. 在 Windows PowerShell 中运行此命令 Test-NetConnection,您应该获得 PingSucceededTrue。此测试是为了验证端口 445 是否被您的 ISP 或 VPN 阻止。

如果您的测试结果为False,则您的 ISP 或防火墙需要打开端口 445(TCP 出站)。<​​/p>

测试端口 445 是否被防火墙或 ISP 阻止的另一种方法是使用 AzFileDiagnostics tool .

原因:

从区域或数据中心外部,Azure 文件仅允许具有加密支持连接的 SMB 3.0。

由于某些历史原因,在较低的 SMB 版本中发现了漏洞,端口 445 已被 ISP、系统防火墙或组织封锁。

从 Windows 系统连接到 Azure 文件共享的其他方法:

  1. 您可以为 Azure 文件共享设置点到站点 VPN。引用这个GitHub article用于设置 P2S VPN。
  2. 您可以在本地计算机上使用 SMB 3.0 协议(protocol)装载文件共享。
  3. 您可以使用 Azure 存储资源管理器等工具来访问文件共享中的文件。

示例:从存储帐户生成 Azure 文件共享的 SAS URL。

enter image description here

打开 Azure 存储资源管理器并使用 SAS URL 登录存储帐户: enter image description here在接下来的窗口中选择 SAS URL 选项,粘贴从 Azure 存储帐户门户复制的 URL,然后单击“连接”。

结果: enter image description here

  • 您可以使用存储客户端库、REST API、PowerShell 或 Azure CLI 从应用程序访问 Azure 文件共享中的文件。
  • 关于azure - 无法将文件共享从 azure 连接到 Windows 笔记本电脑,端口 445 被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71948299/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com