"Entering passive Mode" solution when FTP connection occurs

Source: Internet
Author: User
Tags ftp ftp connection

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.