Port mode and PASV mode for FTP

Source: Internet
Author: User

  FTP has two modes, port mode (also called active mode) and PASV mode (also known as passive mode ), how to understand these two modes? Let me make a metaphor. In active mode: The client sends a command to the server-side 21 port to say, what do I want to download, And will also say that I have opened a port of my own, you can give me something from here, the server will know through another data port to the client, this is the active mode, it can be understood as the server to actively transfer files to the client; in passive mode: The client sends a command to port 21 What I want to download what, the server side know, open a port, and then tell the client, I have opened a port, you go in and get it, so the client from that port to get files, this is the passive mode, it can be understood as the server side by the client took things.

  

In the active mode, the FTP two ports is relatively fixed, if the command port is x, then the data port is x-1, that is, by default, the command port is 21, the data port is 20; you change the command port to 600, then the data port is 599. So the use of firewalls is very convenient, as long as the two ports can be opened, but if the client is sharing the Internet, then it is not normal use of FTP, this still does not work, must be passive mode.

In the passive mode is a bit of trouble, by default the command port is 21, but the data port is random , this problem again let me headache, fortunately, I found a way, because the passive mode in the range of data port can be customized, here I serv-u 6.1.0.5 version For example, in/local server/settings/advanced/, this good, I put the passive mode port range is also set to 20-20, then no matter what mode the client uses to access my FTP, only need to open these two ports, Plus 1433 of SQL Server, a server in total opened 3 ports, this should be more secure, installed on the firewall

Port mode and PASV mode 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.