|
|
在iptables 中设置了
iptables -P INPUT DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 2121 -j ACCEPT
#我的FTP端口是这样设置的
listen_port=2121
ftp_data_port=2020
#现在的问题是
[root@test route2]# ftp -n 192.168.0.254 2121
Connected to 192.168.0.254.
220 Welcome to blah FTP service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
ftp> user aaa
331 Please specify the password.
Password:
230 Login successful.
ftp> ls
227 Entering Passive Mode (192,168,0,254,32,144)
receive aborted
waiting for remote to finish abort
ftp> binary
200 Switching to Binary mode.
ftp> ls
227 Entering Passive Mode (192,168,0,254,183,38)
^Xftp: connect: Connection timed out
ftp>
能正常登陆,但不能传数据,是因为在被动模式下吗?
如果把iptables -P INPUT DROP设为ACCEPT则正常,我需要于打开其它端口吗? |
|