I'm struggling to connect to FTP on a new VM in Azure.

I made a new Virtual Machine from the default image (Windows Server 2012 Datacenter) and RDPed into the new VM. I then enabled the Web Server (IIS) role including the FTP Server and configured IIS using the recommended setting from the Web Platform Installer. I then used the IIS Manager "Add FTP Site..." wizard to add an FTP site with root %systemdrive%\inetpub\ftproot and set the ftp site to have Anonymous Authentication enabled, Allow Anonymous Users Read access, give a Data Channel Port Range 7000-7014, and specify the External IP Address of Firewall as the Public virtual IP (VIP) address from the VM's dashboard in the Azure management portal.

The firewall is also configured to allow the FTP Server.

At this point the FTP service is working. I know because if I open a command prompt on the VM in an RDP session I get the following

Connected to
220 Microsoft FTP Service
User ( ftp
331 Anonymous access allowed, send identity (e-mail name) as password.
230 User logged in.

However I cannot connect from elsewhere.

Connected to
Connection closed by remote host.

That's from the command prompt in FileZilla I get

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

I have followed door Ronald's Walkthrough: Hosting FTP on IIS 7.5 in a Windows Azure VM and have added two endpoints to allow access to ports 21 (FTP command port) and 20 (FTP data port) and I have used his Azure Powershell suggestion to add the passive port endpoints, e.g.

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

that I can then see in the list of endpoints on the Azure management for the VM.

Why are my connections are not getting through to the FTP server in IIS from outside? How might I diagnose the failure?

========== EDIT 1 ==========

I wondered if the solution that worked for haxor might solve things. That references the answer to 'Server 2012 VM on Azure - Passive FTP Won't Work' on the Windows Azure Virtual Machines forum which notes that if a probe is configures by the Azure Portal on the passive endpoints then they may not work. Although the answer notes that this is fixed in the latest version of the portal it suggests using the Azure Powershell cmdlet Add-AzureEndpoint to ensure no probe is started. I've checked with the Azure Powershell cmdlet Get-AzureEndpoint and none of my ftp endpoints have probes, so that is not my issue here.

========== EDIT 2 ==========

I noticed a step in Passive FTP and dynamic ports in IIS8 and Windows Azure Virtual Machines not mentioned in the original walkthrough: open the data channel port range (7000-7014) in Windows Firewall. I have added an inbound rule to do that. I still cannot connect.

  • I've also asked this on SO stackoverflow.com/q/18713701/575530 Although it is not a programming question there are already lots of related questions there.
    – dumbledad
    Sep 10, 2013 at 10:02
  • I deleted the FTP site and tried again. It now works, but I'm not sure why! If I find out I'll post it as an answer.
    – dumbledad
    Sep 10, 2013 at 11:27

1 Answer 1


A colleague suggested investigating SSL so I deleted the FTP site and started again building a new one. The new ftp site worked. Staring at the config screens for the new FTP site in the IIS Manager I have a suspicion that the binding on the old site was incorrectly specifying as the IP Address instead of All Unassigned (i.e. *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.