FTP问题???
请问我设置好FIRWALL之后,
具体内容是
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
iptables -A FORWARD -p tcp -dport 21 -j ACCEPT
还有就是一些我允许的计算机啦。
可是我运行FTP与INTERNET上的FTP连接的时候就出现如下的内容:
STATUS:>; 连接: Tuesday 17:55:06 04-19-2005
STATUS:>; 正在连接 xxx.xxx.xxx.xxx
STATUS:>; 正在连接 xxx.xxx.xxx.xxx(IP = xxx.xxx.xxx.xxx)
STATUS:>; Socket 已连接,正在等待欢迎消息...
220 server1 Microsoft FTP Service (Version 5.0).
STATUS:>; 已连接,正在验证...
COMMAND:>; USER anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
COMMAND:>; PASS ********
230 Anonymous user logged in.
STATUS:>; 登录成功
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; REST 100
350 Restarting at 100.
STATUS:>; 这个站点可以续传断掉的下载
COMMAND:>; REST 0
350 Restarting at 0.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE A
200 Type set to A.
STATUS:>; 正在接收目录列表...
COMMAND:>; PASV
227 Entering Passive Mode (192,168,8,33,6,95).
COMMAND:>; LIST
STATUS:>; 正在连接数据 Socket...
425 Can't open data connection.
ERROR:>; 建立数据 Socket 失败
ERROR:>; 文件错误
STATUS:>; 断开连接: Tuesday 17:56:03 04-19-2005
STATUS:>; 连接: Tuesday 17:56:03 04-19-2005
STATUS:>; 正在连接 xxx.xxx.xxx.xxx
STATUS:>; 正在连接 xxx.xxx.xxx.xxx(IP = xxx.xxx.xxx.xxx)
STATUS:>; Socket 已连接,正在等待欢迎消息...
220 server1 Microsoft FTP Service (Version 5.0).
STATUS:>; 已连接,正在验证...
COMMAND:>; USER anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
COMMAND:>; PASS ********
230 Anonymous user logged in.
STATUS:>; 登录成功
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; REST 100
350 Restarting at 100.
STATUS:>; 这个站点可以续传断掉的下载
COMMAND:>; REST 0
350 Restarting at 0.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE A
200 Type set to A.
STATUS:>; 正在接收目录列表...
COMMAND:>; PASV
227 Entering Passive Mode (192,168,8,33,6,171).
COMMAND:>; LIST
STATUS:>; 正在连接数据 Socket...
425 Can't open data connection.
ERROR:>; 建立数据 Socket 失败
ERROR:>; 文件错误
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE A
200 Type set to A.
COMMAND:>; REST 0
350 Restarting at 0.
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; REST 0
350 Restarting at 0.
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; REST 0
350 Restarting at 0.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE I
200 Type set to I.
COMMAND:>; CDUP
250 CWD command successful.
COMMAND:>; pwd
257 "/" is current directory.
COMMAND:>; TYPE A
200 Type set to A.
STATUS:>; 正在接收目录列表...
COMMAND:>; PASV
227 Entering Passive Mode (192,168,8,33,10,84).
COMMAND:>; LIST
STATUS:>; 正在连接数据 Socket...
425 Can't open data connection.
ERROR:>; 建立数据 Socket 失败
ERROR:>; 文件错误
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
肯定不行的
1、没有加载ip_nat_ftp模块
2、没有允许ESTABLISHED,RELATED状态包
这样写对吗?
(1) modprobe ip_nat_ftp
(2) iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
还是“打开数据 Socket 出错 ”
请问这句有没有用呀?
iptables -A FORWARD -p tcp --dport ftp-data -j ACCEPT
弹出如下对话框
怎么啦!有什么人可以帮到我啊!
这样写没错,但不知道你总体iptables规则是怎么设计的
另外,再加一个ip_conntrack_ftp