Ftp active connection and passive connection, but not firewall settings

Source: Internet
Author: User
Ftp active connection and passive connection, but not firewall settings active connection: port connection mode means that the client establishes a connection with the ftp server through ftp port (21) to form a link, when data transmission is required, the client opens a port using port on the link and reports... ftp active connection and passive connection, but not firewall settings active connection: port connection mode means that the client establishes a connection with the ftp server through ftp port (21) to form a link, when data transmission is required, the client uses port to open a port on the link and tells the ftp server its own port number, then the ftp server can communicate with the port number of the client through its own port 20, establish a connection, and perform data transmission. the firewall settings are also relatively simple, you only need to control the connection to Port 21. for example, iptables-a input-p tcp-s 192.168.1.0/24 -- dport 21-j ACCEPT can bring the client online for passive connections: pasv connection means that the client establishes a connection with the ftp server through the ftp port to form a link. when data needs to be transmitted, the server opens a port through the pasv command on the link, tell the client to establish a connection through this port, transfer files, firewall settings will take one more step first, you need to modify the ftp configuration file vim/etc/vsftpd. conf pasv_min_port = 6000 pasv_max_port = 6100 and then add the firewall rule iptables-a input-p tcp-s 192.168.1.0/24 -- dport-j ACCEPT iptables-a input-p tcp-s 192.168.1.0/24 -dport 6000: 6100-j ACCEPT

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.