我需要一些帮助来在我的 Azure VM 实例上设置 FTP。
虚拟机是 Windows Server 2012 R2。我已经设置了 Web 服务器角色并在 IIS 中创建了一个 FTP 站点。我已经确认我可以访问 FTP 服务器
ftp command: open localhost
我还在为标准端口 21 配置的 Azure 门户上为 VM 配置了一个 FTP 端点。
最后,我创建了一个防火墙规则以允许所有流量进出端口 21。
现在,当我尝试从我的家用计算机 FTP 到它时,我可以看到服务器公共(public) DNS 名称正在解析为正确的 IP 和端口,但无法建立连接。
我在某处缺少配置步骤吗?
谢谢
最佳答案
从 2012 年 7 月开始有一个很棒的演练'Hosting FTP on IIS 7.5 in a Windows Azure VM ' 作者 Ronald Wildenberg对这个。他附和David's answer .这些是他经历的阶段:
ftp 127.0.0.1
并登录%windir%\system32\inetsrv
中找到。 : appcmd set config /section:system.ftpServer/firewallSupport /lowDataChannelPort:7000 /highDataChannelPort:7014
Get-AzureVM -ServiceName 'myServiceName' -Name 'ftpportal' | Add-AzureEndpoint -Name 'FTPPassive00' -Protocol 'TCP' -LocalPort 7000 -PublicPort 7000 | Update-AzureVM
其中“myServiceName”是我的云服务的名称,“ftpportal”是我的虚拟机的名称。 netsh advfirewall set global StatefulFtp enable
net stop ftpsvc
net start ftpsvc
值得遵循这些步骤in the original article尤其是因为他为每个步骤都提供了有用的屏幕截图,但我认为值得在这里广泛引用以防万一。文章还提到Active FTP vs. Passive FTP, a Definitive Explanation值得一读。
如果我能报告在执行这些步骤后,您的基于 Azure VM 的 FTP 服务器将正常工作并且可以访问,那就太好了。但不幸的是the steps above did not fix it for me :-(
关于iis - 如何在 Azure VM 上设置 FTP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18422391/