Data transfer Mode for FTP
1. Active transmission mode
In the active mode, the FTP data connection and control the direction of the connection is the opposite, that is, the server to the client initiative to initiate a connection for data transmission, the client's connection port is determined by the server and the client through negotiation.
2. Passive mode
In passive mode, FTP data connections and control connections are in the same direction, that is, the client initiates a connection to the server for data transfer, and the client's connection port is the number of the port to use when initiating this data request. When an FTP client accesses an FTP server outside the packet filtering firewall, it needs to use passive transmission mode, because the firewall normally allows all internal to external connections to pass through. However, there are many limitations to externally initiated connections, in which case the client can normally establish a control connection with the server, and if the active transfer mode is used, data transfer commands such as Ls,put and get will not run successfully. The simple packet-worry firewall separates the control connection and the data transmission connection completely, so it is difficult to configure the firewall to allow the active transfer mode FTP data connection to pass through. The use of passive transmission mode can generally solve such problems, because in the power transfer mode, the data connection is initiated by the client, but this depends on whether the FTP server and client programs support passive transmission mode.