gpt4 book ai didi

iis - 让 FTP 在 Azure VM 上运行,克服 ftp 客户端上的 'connection closed'

转载 作者:行者123 更新时间:2023-12-03 00:16:05 24 4
gpt4 key购买 nike

我很难连接到 Azure 中新虚拟机上的 FTP。

我从默认镜像(Windows Server 2012 Datacenter)创建了一个新的虚拟机,并通过 RDP 连接到新的虚拟机中。然后,我启用了 Web 服务器 (IIS) 角色,包括 FTP 服务器,并使用 Web 平台安装程序中的推荐设置配置了 IIS。然后,我使用 IIS 管理器“添加 FTP 站点...”向导添加一个具有 root %systemdrive%\inetpub\ftproot 的 FTP 站点,并将 ftp 站点设置为启用匿名身份验证、允许匿名用户读取访问权限,提供数据通道端口范围 7000-7014,并将防火墙的外部 IP 地址指定为 Azure 管理门户中 VM 仪表板的公共(public)虚拟 IP (VIP) 地址。

防火墙也配置为允许 FTP 服务器。

此时FTP服务正在工作。我知道,因为如果我在 RDP session 中的虚拟机上打开命令提示符,我会得到以下内容

C:\Users\slife>ftp 127.0.0.1
Connected to 127.0.0.1.
220 Microsoft FTP Service
User (127.0.0.1:(none)): ftp
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:
230 User logged in.
ftp>

但是我无法从其他地方连接。

C:\Users\timregan>ftp 111.111.111.33
Connected to 111.111.111.33.
Connection closed by remote host.

这是我从 FileZilla 中的命令提示符得到的

Status: Connecting to 111.111.111.33:21...
Status: Connection established, waiting for welcome message...
Error: Could not connect to server

我已经关注了 Ronald 的门 Walkthrough: Hosting FTP on IIS 7.5 in a Windows Azure VM并添加了两个端点以允许访问端口 21(FTP 命令端口)和 20(FTP 数据端口),并且我使用了他的 Azure Powershell 建议来添加被动端口端点,例如

Get-AzureVM -ServiceName 'blah' -Name 'blah' | Add-AzureEndpoint -Name 'FTPPassive00' -Protocol 'TCP' -LocalPort 7000 -PublicPort 7000 | Update-AzureVM

然后我可以在 VM 的 Azure 管理的端点列表中看到它。

为什么我的连接无法从外部连接到 IIS 中的 FTP 服务器?我如何诊断故障?

==========编辑1==========

我想知道是否 the solution that worked for haxor可能会解决问题。这引用了' Server 2012 VM on Azure - Passive FTP Won't Work 的答案Windows Azure 虚拟机论坛上指出,如果通过 Azure 门户在被动端点上配置探测器,那么它们可能无法工作。尽管答案指出此问题已在最新版本的门户中修复,但建议使用 Azure Powershell cmdlet Add-AzureEndpoint 以确保不启动任何探测。我已使用 Azure Powershell cmdlet Get-AzureEndpoint 检查过,我的 ftp 端点都没有探测器,因此这不是我的问题。

==========编辑2==========

我注意到 Passive FTP and dynamic ports in IIS8 and Windows Azure Virtual Machines 中的一个步骤the original walkthrough中未提及:在Windows防火墙中打开数据通道端口范围(7000-7014)。我添加了一条入站规则来执行此操作。我仍然无法连接。

最佳答案

更完整的说明可以在以下位置找到:http://blogs.msdn.com/b/wats/archive/2013/12/13/setting-up-a-passive-ftp-server-in-windows-azure-vm.aspx我按照那里的说明进行操作,FTP 在 Azure 上运行得很好。

关于iis - 让 FTP 在 Azure VM 上运行,克服 ftp 客户端上的 'connection closed',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18713701/

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