vsftp問題「227 Entering Passive Mode」

①昨天測試防火牆
#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.
一切正常
 
 
相關文章
相關標籤/搜索