CentOS8.0-1905 ftp server installation configuration

Keywords: CentOS8 / RHEL8; Configuration FTP / configuration VSFTPD; passive mode / PASV
## CentOS8.0-1905 after release, try to migrate to the new version of FTP server in CentOS, but the testing process, open ftp service in the firewall after still been unable to connect, or if you use lftp ftp tool test, you will be prompted to host [no] routing error. But after turn off the firewall, ftp service can be accessed normally.
Process ## relevant data, there is information that firewalld software bug, but after trying to install http, test successfully, indicating that the firewall is not the problem.
## to research other relevant information, found that most clients chrome, firefox Filezilla or other tools, use the default passive mode (PASV mode) access ftp service, so speculation is passive mode ftp work, the port was rejected problem.
After ## increase PASV settings in vsftpd configuration file, and open the specified port in the firewall, it can be a normal visit.
##### steps are as follows:
1, the installation
yum the install the vsftpd -Y
2, adjust the configuration
Vim /etc/vsftpd/vsftpd.conf
## as necessary to adjust the configuration, for example, enable anonymous access functions
## Passive mode enabled
## ################
# ## pasv_enable = YES enabled
# pasv_min_port = 10000 ## lowest pasv open port, recommended greater than 1024 high-port
# pasv_max_port = 11000 ## open up the pasv port
#######################
3, adjust the firewall configuration
## enabled ftp server
Firewall-cmd --add-Service = ftp --permanent
###### increase ftp access
Firewall-cmd = --add-Port 10000-11000 / tcp --permanent
# ##### above command, open port numbers 10000-11000 tcp
###### if there is a need to increase the corresponding udp port
firewall-cmd --reload
## reload firewall
4, restart the ftp service can be accessed

Guess you like

Origin blog.51cto.com/zengdesheng/2446215