Cannot list directory on IIS FTP server on Azure, even after configuring Azure inbound rules and Windows firewall Cannot list directory on IIS FTP server on Azure, even after configuring Azure inbound rules and Windows firewall azure azure

Cannot list directory on IIS FTP server on Azure, even after configuring Azure inbound rules and Windows firewall


In Azure, we should deploy the passive mode FTP, we should add data channel ports range in FTP Firewall Support, then add those ports to NSG and windows firewall inbound rules.

enter image description here

By the way, although the windows firewall seems to allow all traffic that’s required, we also need to enable stateful FTP filtering on the firewall:

netsh advfirewall set global StatefulFtp enable

Then restart the FTP windows service and we should be up and running:

net stop ftpsvcnet start ftpsvc

Here is a similar case, same error as you, please refer to it.

Check which port does the FTP site listen on:enter image description here


It is usually necessary to restart the Microsoft FTP service after enabling the FTP server rules in Windows firewall to have the change take an effect.

Or restarting a whole machine.

See my guide to Installing an FTP Server on Windows using IIS.


The issue was with Azure network NSG. you need to enable the port range on which data is getting transferred.Data connection port range

Added new rule in NSG to open this port range and it worked.