Firewall – IIS ftp server issue from command line

firewallftpiiswindows-command-prompt

I'm trying to config an ftp server on IIS (Windows Server 2008 R2)

I configured basic authentication with read,write permissions for a user and no SSL

I also opened port 21 on server firewall

then from server cmd, i opened localhost, and after login i tried "ls" command and it has been successful

then i tried from a client with FileZilla and it works

here the log :

Stato:  Connessione a X.X.X.X:Y...
Stato:  Connessione stabilita, in attesa del messaggio di benvenuto...
Trace:  CFtpControlSocket::OnReceive()
Risposta:   220 Microsoft FTP Service
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    AUTH TLS
Trace:  CFtpControlSocket::OnReceive()
Risposta:   534 Local policy on server does not allow TLS secure connections.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    AUTH SSL
Trace:  CFtpControlSocket::OnReceive()
Risposta:   534 Local policy on server does not allow TLS secure connections.
Stato:  Server non sicuro, non supporta FTP su TLS.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    USER **********
Trace:  CFtpControlSocket::OnReceive()
Risposta:   331 Password required for **********.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    PASS **********
Trace:  CFtpControlSocket::OnReceive()
Risposta:   230 User logged in.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    OPTS UTF8 ON
Trace:  CFtpControlSocket::OnReceive()
Risposta:   200 OPTS UTF8 command successful - UTF8 encoding now ON.
Stato:  Accesso effettuato
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Trace:  CFileZillaEnginePrivate::ResetOperation(0)
Trace:  Measured latency of 60 ms
Stato:  Lettura elenco cartelle...
Trace:  CFtpControlSocket::SendNextCommand()
Trace:  CFtpControlSocket::ChangeDirSend()
Comando:    PWD
Trace:  CFtpControlSocket::OnReceive()
Risposta:   257 "/" is current directory.
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Trace:  CFtpControlSocket::ParseSubcommandResult(0)
Trace:  CFtpControlSocket::ListSubcommandResult()
Trace:    state = 1
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Stato:  Elenco cartella di "/" completato
Trace:  CFileZillaEnginePrivate::ResetOperation(0)

but from a client cmd, trying "ls" command i receive:

501 Server cannot accept argument.
150 Opening ASCII mode data connection.

and from another one after "open [ip] [port]" command i don't receive anything

I think that's a firewall problem and has to do with active/passive mode but why with FileZilla it works fine?

What should I do to make it work from the command line?

EDIT
I also tried to disable windows firewall but problem persists

but if is it, why FileZilla works ? can't i use active mode with default ports instead of passive mode with dynamics ports?

Best Answer

it's the firewall, the dynamci port is blocked

try this:

netsh int ipv4 set dynamicport tcp 49152 16383 persistent

this opens all of the FTP dynamic ports