"227 Entering Passive Mode" solution when FTP connection

  
                  

Two working modes of FTP service:

•port mode (active mode), connection process: The client sends a connection request to the server's FTP port (default is 21), the server accepts the connection, establishes A command link. When the data needs to be transmitted, the client tells the server with the PORT command on the command link: "I opened the ***X port, and you came over to connect me". The server then sends a connection request from port 20 to the client's ***X port, establishing a data link to transmit the data.

•pasv mode (passive mode), connection process: The client sends a connection request to the server's FTP port (default is 21), the server accepts the connection, and establishes a command link. When data needs to be transferred, the server tells the client with the PASV command on the command link: "I opened the ***X port, and you came over to connect me". The client then sends a connection request to the server's ***X port to establish a data link to transfer the data.

Because of the TCP/IP filtering of FTP on the server, only certain ports can be connected by the client, so the PASV method cannot be used. Found the reason, the solution is also very simple, just need to close the client's PASV mode, forcing it to use PORT mode to access the server.

After the client logs in to the FTP server, use the passive command to disable the PASV mode of the client as follows:

The code is as follows

ftp>passive

Passive mode off .

Execute this command again to enable PASV mode.

Copyright © Windows knowledge All Rights Reserved