centos7 next FTP file server configuration (simple configuration)

Reference article :( clear principle) https://www.cnblogs.com/lsy-blogs/p/10170662.html
(configuration definition) https://blog.csdn.net/eakom/article/details/79027258
(Ali server ) https://help.aliyun.com/document_detail/86292.html?spm=5176.10695662.1996646101.searchclickresult.772278aaSFRIWA
(ultra-detailed) https://segmentfault.com/a/1190000008161400

Configuration FTP server process

  1. installation
//查看是否安装
rpm -q vsftpd
//安装
yum -y install vsftpd

//开启服务
systemctl start vsftpd.service

//使服务开机自启动
systemctl enable vsftpd.service
  1. Simple test, whether you can use, there is an error I recommend a look at this article
    ( https://mp.csdn.net/mdeditor/97280774#), be sure to remember the IE browser is set to open for FTP folder. Open IE browser, select Settings> Internet Options> Advanced. Check the Enable FTP folder view, uncheck the Use Passive FTP (ip using your public ip).
    Here Insert Picture Description

  2. Using the System account login

//新建用户ftpuser
useradd ftpuser
passwd ftpuser

// modify the configuration file /etc/vsftpd/vsftpd.conf

anonymous_enable=NO   #禁止匿名用户登录,把默认YES改成NO
#开启被动模式
#这样远程连接才可以进行传输数据
#默认是开启的,但是要指定一个端口范围,打开vsftpd.conf文件,在后面加上
pasv_min_port=30000
pasv_max_port=30999

Restart Service

systemctl restart vsftpd

Reference article: https://blog.csdn.net/gew25/article/details/52835877
4. We find that when linked particularly slow, it is because a reverse DNS this feature,

//禁用DNS反向解析,在/etc/vsftpd/vsftpd.conf添加下面这一行
reverse_lookup_enable=no

2.ftp server active, passive mode difference

1, the active mode (PORT):

principle:

21-port FTP client to connect to the FTP server sends the user name and password, to list list or read data after a successful login, the client randomly open a port (above 1024), sends a PORT command to the FTP server, tells the server to the client using active mode and an open end port; pORT FTP server receives an active mode command and a port number, via open port 20 and client-server connected to the port, the transmission data.

Highlights:

When the data transfer port is "server" connected to "client" of;

The client needs to have open ports to servers, many clients are inside the firewall, open ports to the FTP server access is difficult;

2, passive mode (PASV):

principle:

21-port FTP client to connect to the FTP server sends the user name and password, to list list or read data after a successful login, send PASV command to the FTP server, randomized, open a port on the local (1024 or more), then open ports to tell the client, the client and then connect to the server and open port for data transfer.

Highlights:

Data transfer port is "client" is connected to "server";

Only need to open the server port to client connections on the line;

3, how to choose ftp mode:

If only in the company LAN using ftp, you can use active mode, but ftp client firewall best to turn off or open ftp data port ranges required, there is no security problems. If it is a public network ftp passive mode, you can customize the interface, more secure.

Want to be safe, convenient connection to use passive mode.

Published 36 original articles · won praise 11 · views 10000 +

Guess you like

Origin blog.csdn.net/s_xchenzejian/article/details/97268639