问题
I provisioned a Windows Server 2012 vm in Azure. When I try to connect to it via FileZilla FTP client I get a Could not connect to server error
.
Here's what I have tried so far:
- Added inbound rule for FTP (TCP/21) in the Azure portal
- In IIS, configured FTP Firewall Support. Set
Data Channel Port Range to 7000-7002
,External IP Address of Firewall to my vm's public IP
,added 7000, 7001 and 7002 to inbound rules
,did a net start/stop ftpsvc
回答1:
The step I'm missing in your description, is enabling "FTP server" rules in Windows firewall.
They are created during IIS server installation, but are disabled by default. You have to enable them.
Quoting my guide to Installing a Secure FTP Server on Windows using IIS:
An internal Windows firewall is automatically configured with rules for the ports 21, 990 and 1024-65535, when IIS FTP server is installed.
The rules are not enabled initially though. To enable or change the rules, go to Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules and locate three “FTP server” rules. If the rules are not enabled, click on Actions > Enable Rule.
If you do not have them, for whatever reason, you have to create them manually. For port 21 and the data ports (in your case 7000-7002).
来源:https://stackoverflow.com/questions/40885337/cannot-connect-ftp-to-azure-virtual-machine