FTP Active and passive mode, and Linux server configuration

Source: Internet
Author: User

FTP作为一种简单的明文文件传输协议,其工作过程有两个工作进程--(命令进程(默认21端口)与数据传输进程);而数据传输进程又分为主动与被动两种模式:主动FTP:命令连接:客户端 >1023端口 -> 服务器 21端口数据连接:客户端 >1023端口 < - 服务器 20端口 被动FTP:命令连接:客户端 >1023端口 -> 服务器 21端口数据连接:客户端 >1023端口 -> 服务器 >1023端口 可以看出两种模式最大的区别就是数据请求是由客户端还是服务端发出;而主动模式下服务端请求为一个固定的端口,默认是20(可以通过ftp_data_port 这个参数进行修改);那主被动模式如何切换?port_enable=NO或者YES 主动模式设置pasv_enable=NO或者YES 被动模式设置pasv_max_port,pasv_min_port 这两个参数可以设置被动模式下服务端使用的端口范围。主动与被动FTP优缺点: 主动FTP对FTP服务器的管理有利,但对客户端的管理不利。因为FTP服务器企图与客户端的高位随机端口建立连接,而这个端口很有可能被客户端的防火墙 阻塞掉。被动FTP对FTP客户端的管理有利,但对服务器端的管理不利。因为客户端要与服务器端建立两个连接,其中一个连到一个高位随机端口,而这个端口 很有可能被服务器端的防火墙阻塞掉。FTP的用户访问控制:/etc/vsftpd/ 下有两个用户列表文件:ftpuser和user_list ;ftpuser里面的用户默认拒绝访问,user_list也默认拒绝(除非配置了userlist_deny=NO),此时user_list文件中的用户为允许访问。

Active and Passive FTP mode, and configuration of Linux server side

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.