FTP Active mode passive mode

Source: Internet
Author: User
Tags ftp client

FTP Active Mode PORT

The client logs on to the FTP client to connect to port 21 on the server
After successful login, the client randomly distributes a high port for listening (greater than 1024) and notifies the FTP
FTP received the client's notification after using a (N-1 that is, the FTP port minus 1 of the port FTP is 21 so here is 20) port to the client specified high-end port transfer data


20-Port and 21-port open in Iptables
Iptables -I INPUT -p TCP --dport 20-j ACCEPT
Iptables -I INPUT -p TCP --dport 21-j ACCEPT




FTP Passive Mode PASV



When the client connects to FTP, the FTP server randomly assigns a port to transmit the data requested by the client.
The port range specifies an FTP profile within the FTP configuration file:/etc/Vsftpd/Vsftpd.conf

In/etc/Vsftpd/Find Inside Vsftpd.conf

Pasv_min_port=50000Randomly assigned minimum port

Pasv_min_port=60000Randomly assigned maximum port


Also need to set the corresponding port in the Iptables

Iptables-I INPUT-P TCP--dport 50000:60000-j ACCEPT

FTP Active mode passive mode

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.