Enable the vsftpd port under iptables Firewall
After enabling the vsftpd port, you can use a client tool to log on, but cannot browse files or create new files. now I checked the ftp protocol and found that ftp has active and passive modes. enabling port 21 on the server end is to allow the client to come in, but there is no outgoing port, the port opened on the server end is also added to the ftp module, the entire operation is a bit complicated, write it down today and deepen your impressions.
-------------------------------------- Split line --------------------------------------
Four Advanced configurations of vsftpd Server:
VsFTPd configuration Tutorial:
Simple and practical Ubuntu FTP setup
Set up FTP server and Apache server on Ubuntu
Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform
Install vsftpd source code in Linux
Case study of vsftpd Security Configuration
-------------------------------------- Split line --------------------------------------
1. Install vsftpd Software
Yum install vsftpd-y
2. enable Anonymous Access and passive mode ports
Vim/etc/vsftpd. conf
Anonymous_enable = YES -- enable Anonymous user access
Anon_upload_enable = YES -- the anonymous user name can upload files.
Anon_mkdir_write_enable = YES -- anonymous users can create files.
Anon_other_write_enable = YES -- anonymous users can rename files.
Pasv_enable = YES -- enable Passive Mode
Pasv_min_port = 30000 -- minimum port in passive mode
Pasv_max_port = 31000 -- maximum port in passive mode
3. Load the ftp Module
Vim/etc/modprobe. d/vsftpd. conf
Alias ip_conntrack ip_conntrack_ftp ip_nat_ftp -- load the ftp Module
Vim/etc/rc. local
/Sbin/modprobe ip_conntract -- boot Module
/Sbin/modprobe ip_conntrack_ftp
/Sbin/modprobe ip_nat_ftp
4. Port Filtering
Vim/etc/sysconfig/iptables
-A input-p tcp-m multiport -- dport 20, 21-m state -- state NEW-j ACCEPT -- enable port 20 and port 21
-A input-p tcp-m state -- state NEW-m tcp -- dport 21-j ACCEPT -- enable the 21 active port
-A input-p tcp -- dport 30000: 31000-j ACCEPT -- enable passive Port
5. login Test
This article permanently updates the link address: