Two modes of operation for FTP

Source: Internet
Author: User


Note: ①ftp monitor two ports: Control port 21 and data port 20

② Two modes of operation: Active mode and passive mode


Active mode:

Client to connect to the FTP server, the client will randomly open a port greater than 1024, to connect the FTP server Port 21st control port, the process requires three handshake (skip), after the connection client can execute some commands on the server, such as: query, upload, download, etc.

When data transfer occurs between the client and the server, the client tells the server which mode to use, such as active mode (active), when the FTP server connects to the client's other random port via its 20th data port , which requires three handshakes (skip) , and then establish a connection for data transfer


Passive mode:

Client to connect to the FTP server, the client will randomly open a port greater than 1024, to connect the FTP server Port 21st control port, the process requires three handshake (skip), after the connection client can execute some commands on the server, such as: query, upload, download, etc.

When data transmission between the client and the server is generated, the client sends the PASV (passive) data signal to the FTP server, tells the server to use Passive mode (passive), and waits for the service side to respond, when the FTP server will randomly open a port number, And the information to the client, waiting for the client to connect, and then the client will randomly open another port greater than 1024 to connect the server side of this random port number , this process requires three handshake (skip), and then establish a connection for data transmission



Note: The data port is established only when the client and the server are ①, otherwise only the control port is established.

② has a problem in active mode:

When the server port 20th data port to connect to the client, the client LAN will generally have a firewall Nat function, because the NAT address translation, FTP servers can only obtain NAT IP, not the client's IP, which causes the FTP service side can not successfully connect the client At this point, we can use the passive mode to solve this problem, let the client actively to connect the server

③ftp in the process of data transmission is clear text transmission, so there will be a certain security problems, unless the school and other educational institutions to share some of the unimportant resources can use FTP, or less

④ now commonly used FTP software is VSFTPD









This article is from the "See" blog, please be sure to keep this source http://732233048.blog.51cto.com/9323668/1618624

Two modes of operation for FTP

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.