G
G
Grims2015-01-16 13:23:19
FTP
Grims, 2015-01-16 13:23:19

425 Can't open data connection for transfer of "/"?

Hello community!
There is a problem, the FTP server cannot transfer / or the client cannot get a list of files that are on the FTP server (the "ls" command). I suspect that the ports for the passive mode of operation in the client-server-client connection are not opened when the client is the Windows command line. To make it clear, I do two experiments.
First experience #1
Connecting to the server using the FileZilla Client program in the "Passive" connection mode.
8ef468e45bd0499694dec687fb4a1452.jpg
As you can see from the log, the port opens and everything is fine, the log from the server:

16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> Connected on port 21, sending welcome message.
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> 220 Please visit http://ru/
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> AUTH TLS
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> 502 SSL/TLS authentication not allowed
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> AUTH SSL
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> 502 SSL/TLS authentication not allowed
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> USER user
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> 331 Password required for user
16.01.2015 11:15:34 - (not logged in) (77.xx.xx.xx)> PASS connect
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 230 Logged on
16.01.2015 11:15:34 - user (77.xx.xx.xx)> SYST
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 215 UNIX emulated by FileZilla
16.01.2015 11:15:34 - user (77.xx.xx.xx)> FEAT
16.01.2015 11:15:34 - user (77.xx.xx.xx)> PWD
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 257 "/" is current directory.
16.01.2015 11:15:34 - user (77.xx.xx.xx)> TYPE I
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 200 Type set to I
16.01.2015 11:15:34 - user (77.xx.xx.xx)> PASV
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 227 Entering Passive Mode (213,хх,хх,хх,195,187)
16.01.2015 11:15:34 - user (77.xx.xx.xx)> MLSD
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 150 Opening data channel for directory listing of "/"
16.01.2015 11:15:34 - user (77.xx.xx.xx)> 226 Successfully transferred "/"

First experience #2
Connecting to the server using the Windows command line (cmd), switching to the passive connection mode is done with the "quote pasv" command.
Log from FTP server:
16.01.2015 11:02:09 - (not logged in) (77.хх.хх.хх)> Connected on port 21, sending welcome message.
16.01.2015 11:02:09 - (not logged in) (77.хх.хх.хх)> 220 Please visit http://ru/
16.01.2015 11:02:12 - (not logged in) (77.хх.хх.хх)> USER user
16.01.2015 11:02:12 - (not logged in) (77.хх.хх.хх)> 331 Password required for edu
16.01.2015 11:02:16 - (not logged in) (77.хх.хх.хх)> PASS connect
16.01.2015 11:02:16 - user (77.хх.хх.хх)> 230 Logged on
16.01.2015 11:02:30 - user (77.хх.хх.хх)> PASV
16.01.2015 11:02:30 - user (77.хх.хх.хх)> 227 Entering Passive Mode (213,хх,хх,хх,195,186)
16.01.2015 11:02:38 - user (77.хх.хх.хх)> TYPE I
16.01.2015 11:02:38 - user (77.хх.хх.хх)> 200 Type set to I
16.01.2015 11:02:46 - user (77.хх.хх.хх)> TYPE A
16.01.2015 11:02:46 - user (77.хх.хх.хх)> 200 Type set to A
16.01.2015 11:02:46 - user (77.хх.хх.хх)> PORT 77,хх,хх,хх,165,254
16.01.2015 11:02:46 - user (77.хх.хх.хх)> 200 Port command successful
16.01.2015 11:02:46 - user (77.хх.хх.хх)> NLST
16.01.2015 11:02:46 - user (77.хх.хх.хх)> 150 Opening data channel for directory listing of "/"
16.01.2015 11:02:57 - user (77.хх.хх.хх)> 425 Can't open data connection for transfer of "/"
16.01.2015 11:08:58 - user (77.хх.хх.хх)> 421 Connection timed out.

Log from client:
C:\Users\AMD>ftp 213.хх.хх.хх
Связь с 213.хх.хх.хх.
220 Please visit http://ru/
Пользователь (213.хх.хх.хх:(none)): user
331 Password required for user
Пароль:
230 Logged on
ftp> quote PASV
227 Entering Passive Mode (213,хх,хх,хх,195,186)
ftp> bin
200 Type set to I
ftp> hash
Вывод метки хеширования Вклftp: (2048 байт/хеш-метка).
ftp> ls
200 Port command successful
150 Opening data channel for directory listing of "/"
425 Can't open data connection for transfer of "/"
421 Connection timed out.
Подключение разорвано удаленным узлом.

f550bc4bfc4043d6a2de3c0b90f1bbfc.jpg
Firewall log:
68d9c2e30a11484d9b0808b53fe8fe28.jpg
Conclusion: something is wrong on the Windows command line...and the FileZilla Client sends the "PASV" command to open a passive port somehow differently (otherwise).
Firewalls and Firewalls have nothing to do with it, I checked without them)
FTP server used: FileZilla Server
Client for the FTP server in experiment No. 1: FileZilla client
Client for the FTP server in experiment No. 2: Windows 8.1 command line

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question