Two modes of operation for the FTP service:
port (Active mode), connection process: The client sends a connection request to the server's FTP port (the default is 21), the server accepts the connection, and establishes a command link. When the data needs to be transferred, the client tells the server on the command link using the port command: "I opened the ***x port and you came to connect me." The server then sends a connection request from Port 20 to the client's ***x port, creating a data link to transmit the data.
PASV (Passive mode), the connection process: The client sends a connection request to the server's FTP port (the default is 21), the server accepts the connection, and establishes a command link. When you need to transfer data, the server tells the client on the command link using the PASV command: "I opened the ***x port and you came to connect me." The client then sends a connection request to the server's ***x port, creating a data link to transmit the data.
Because FTP on the server is TCP/IP filtered, only specific ports are allowed to be connected by clients, so the PASV method cannot be used. Found the reason, the solution is also very simple, only need to shut down the client's PASV way, forcing it to use the port to access the server.
After the client logs on to the FTP server, use the passive command to turn off the client's PASV mode as follows:
The code is as follows
ftp> Passive
Passive mode off.
You can enable PASV mode by executing the command again.