Active and passive methods of VSFTPD in CentOS

Source: Internet
Author: User
Tags ftp client file transfer protocol ftp protocol

URL http://blog.csdn.net/nyunyuzhao/article/details/5734978, studied.

FTP is an abbreviation for file Transfer Protocol, which is used to transfer files to and from one another between two computers. Much more complex than the HTTP,FTP protocol. The reason for this is that the FTP protocol uses two TCP connections, one is a command link to pass commands between the FTP client and the server, and the other is the data link, which is used to upload or download data.



PORT & PASV

The FTP protocol works in two ways: Port mode and PASV mode, Chinese meaning active and passive.

The port (Active) connection process is: The client sends a connection request to the server's FTP port (by default, 21), the server accepts the connection, and establishes a command link. When the data needs to be transferred, the client tells the server with the Port command on the command link: "I opened the XXXX port and you came over to connect me." The server then sends a connection request from Port 20 to the client's XXXX port, creating a data link to transmit the data.

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

As can be seen from the above, the two ways of the command link connection method is the same, and the data link building method is completely different. And the complexity of FTP is that.



Considerations for using FTP clients

Note: Choose to log on to the FTP server in PASV or port mode, and select the FTP client.

One, the client only intranet IP, no public network IP

From the above FTP basic knowledge, if the port method, because the client does not have a public network ip,ftp will not be able to connect the client to establish a data link. Therefore, in this case, the client must use the PASV method to connect to the FTP server. Most people do not log on, the typical cause of the error is because the client does not have a public IP, but the use of IE as an FTP client to log in (ie by default port mode).



Second, the client has a public network IP, but installed a firewall

If you log in to the FTP server in PASV mode, because the client sends a connection request to the server when the data link is established, there is no problem. Conversely, if the FTP server is logged in by port, because the server sends a connection request to the client when the data link is established, the connection request is blocked by the firewall. If you want to log in to the FTP server using port, open the high-end port above 1024 on the firewall.



Third, the common FTP client software port mode and PASV mode switching method.

Most FTP clients use the PASV method by default. IE uses port mode by default.

In most of the FTP client settings, often see the words are "PASV" or "passive mode", very rare to "PORT" or "active mode" and other words. Because there are only two types of FTP logins: port and PASV, and canceling the PASV mode means using the Port method.



Ie:

Tools, Internet Options, advanced-use Passive FTP (requires more than IE6.0 support). If this option is not found, see the picture.



CuteFTP:

PASV Mode, Firewall, Connection, Setting, Edit

or file--site Manager, on the left, select sites, Edit, "Use PASV mode"



FlashGet:

"PASV mode", editor, direct connection, proxy Server, options, tools



FlashFXP:

Options, parameter selection, agent/Firewall/identity, "Using passive mode"

or site management, corresponding site, options, use passive mode

or quick Connect, toggle, use Passive mode



LEECHFTP:

Option-Firewall



Please try not to use IE as an FTP client.

IE is just a rough FTP client tool. First of all, the following version of IE6.0 does not support the PASV mode; second, IE does not see the login information when it logs on to FTP. The cause of the error cannot be found when the login error occurs. When testing, it is strongly recommended not to use IE.

Active and passive methods of VSFTPD in CentOS

Related Article

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.