First, modify configuration files
we /etc/vsftpd/vsftpd.conf
First, we need to add the vsftpd configuration file:
listen_port=1802
pasv_enable=YES
pasv_min_port=30000
pasv_max_port=30999
pasv_promiscuous=YES
listen_port port we can set up their own. pasv_min_port and pasv_max_port also set arbitrarily, behind our firewall to open the corresponding time on it.
Second, modify the services file
vi / etc / services
If we are inconvenient to use VI tool, then downloaded to the local, because more files. FTP directly behind two of the 21 parameters modified to port we set above.
Third, the port firewall settings
Above, we set up a new port, we need to open port, view open ports.
firewall-cmd --zone=public --list-ports
Add in place:
firewall-cmd --zone=public --add-port=1802/tcp --permanent
firewall-cmd --zone=public --add-port=30000-3099/tcp --permanent
Reload:
firewall-cmd --reload
systemctl restart firewalld
Fourth, restart vsftpd Detection
systemctl restart vsftpd
After the restart vsftpd, we look at a new port if you can access the FTP login, Chiang Kai-shek final test is possible.