①昨天测试防火墙
#iptables -P INPUT DROP
②再配置规则,使21与20端口能通过
#iptables  -I INPUT -p tcp --sport 21 -j ACCEPT
#iptables -I INPUT  -p tcp --sport 20 -j ACCEPT
③然后访问ftp服务遇到问题
#ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,34,109)
》》》》出现问题,停着不动了《《《《
 
想了很久,解决如下:
登陆ftp后
先要
ftp> passive             (查看被动模式状态)
Passive mode on.
要改为off才正常
ftp> passive               (同样的命令关闭)
Passive mode off.
 
现在
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x    4 0        0            4096 Sep 08 01:37 pub
226 Directory send OK.
ftp> cd pub
250 Directory successfully changed.
一切正常