Iis – FTPS on IIS 8.5 Error on Command: LIST

ftpftpsiisiis-8.5windows-server-2012-r2

I'm trying to configure FTP over SSL on my server. I added an FTP site in IIS and followed the wizard, setting the bindings and certificate. However when I try to connect to the server using FileZilla the connection gets refused by the server. I also noticed that no welcome message appears. I also noticed that the server sends a reply with an unroutable address. I don't really know how to proceed from here as the setup seems OK for me.

Log:

Status: Resolving address of jensgm.com
Status: Connecting to 213.153.1.168:990...
Status: Connection established, initializing TLS...
Status: Verifying certificate...
Status: TLS connection established, waiting for welcome message...
Status: Connected
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  The data connection could not be established: ECONNREFUSED - Connection refused by server
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

Log file says:

'long time stanp' JENSGM\jensgm 192.168.1.2 21 LIST - 550 1236 15 1cf4a073-6f69-481f-8083-4ec4debfc810 /

'long time stanp' JENSGM\jensgm 192.168.1.2 21 ControlChannelClosed - - 1236 0 1cf4a073-6f69-481f-8083-4ec4debfc810 -

Best Answer

It seems you are using Passive mode.

Passive mode uses TCP ports from 1024 to 65534 for Data channel.

Make sure no Firewall is blocking this port range.

Else, switch to active mode to only use TCP/20 for Data channel.

EDIT :

Also, FTPS can operate in two distinct mode : implicit or explicit.

  • Explicit will use standards ports (for Active mode) : TCP/21 & TCP/20
  • Implicit will use TCP/990 for command and TCP/989 for Data channel

http://en.wikipedia.org/wiki/FTPS