Article Title: FTP active mode and passive mode. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The FTP protocol can work in two ways: PORT and PASV, that is, active and passive.
The active connection process is that the client sends a connection request to the ftp port of the server (21 by default). The server accepts the connection and establishes a command link. When data needs to be transmitted, the client uses the PORT command on the command link to tell the server: "I opened PORT XXXX and you came to connect to me ". The server sends a connection request from Port 20 to port XXXX of the client and establishes a data link to transmit data.
PASV (passive) connection process: the client sends a connection request to the FTP port of the server (21 by default). The server accepts the connection and establishes a command link. When data needs to be transmitted, the server uses the PASV command on the command link to tell the client: "I opened port XXXX, and you came to connect to me ". Therefore, the client sends a connection request to port XXXX of the server and establishes a data link to transmit data.
Summary:
Active Mode: the server knocks on the door to the client and then opens the door.
Passive Mode: the client knocks on the server, and the server opens the door.
Therefore, if you use a proxy to access the Internet, you cannot use the active mode, because the server knocks on the Internet proxy server door instead of the client door.
And sometimes, the client does not easily open the door because of firewall blocking, unless the client opens a high-end port greater than 1024
Download in active mode. Do not check the passive mode (PASV) of the download tool. If an error occurs, download the tool in active mode, then passively switch between them.