全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3082|回复: 10
打印 上一主题 下一主题

[经验] proftpd被iptables防火墙阻止该怎么解决

[复制链接]
跳转到指定楼层
1#
发表于 2010-5-10 19:28:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我已经把21端口开了,也保存了,貌似不管用
[root@server ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:rockwell-csp2
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     esp  --  anywhere             anywhere            
ACCEPT     ah   --  anywhere             anywhere            
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all

现在该怎么处理才能够让ftp正常工作
补充.
[root@server ~]# iptables-save
# Generated by iptables-save v1.3.5 on Mon May 10 06:30:32 2010
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [583:43632]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 2222 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon May 10 06:30:32 2010

[ 本帖最后由 shy9000 于 2010-5-10 19:30 编辑 ]
2#
发表于 2010-5-10 19:30:34 | 只看该作者
我也是小白。
出问题先重启。
3#
发表于 2010-5-10 19:36:10 | 只看该作者
最好就是关掉iptables
4#
 楼主| 发表于 2010-5-10 19:41:22 | 只看该作者
原帖由 daitangjun 于 2010-5-10 19:36 发表
最好就是关掉iptables

关掉iptables就怕给攻击。。
5#
 楼主| 发表于 2010-5-10 19:59:15 | 只看该作者
暂时关闭iptables了。。
6#
发表于 2010-5-11 16:17:26 | 只看该作者
关掉iptables
iptables -F
7#
发表于 2010-5-11 16:43:32 | 只看该作者
加上
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
8#
 楼主| 发表于 2010-5-11 17:45:00 | 只看该作者
感谢楼上兄弟,待会儿试试能用就加分支持
9#
发表于 2010-5-11 18:11:27 | 只看该作者
原帖由 shy9000 于 2010-5-11 17:45 发表
感谢楼上兄弟,待会儿试试能用就加分支持

编辑/etc/sysconfig/iptables后直接service iptables restart
10#
发表于 2010-5-11 18:42:43 | 只看该作者
原帖由 ATOM 于 2010-5-11 18:11 发表

编辑/etc/sysconfig/iptables后直接service iptables restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-12 10:25 , Processed in 0.071730 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表