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.
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
650) this. width = 650; "title =" 10.jpg" src = "http://s3.51cto.com/wyfs02/M00/4D/DA/wKioL1RbFzWR-OMQAAGcax5ZDxs654.jpg" alt = "wKioL1RbFzWR-OMQAAGcax5ZDxs654.jpg"/>
This article from the "days walk together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1573418
Enable the vsftpd port under iptables firewall