免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2119 | 回复: 3
打印 上一主题 下一主题

RHEL AS 5 iptables 问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-02 21:44 |只看该作者 |倒序浏览
刚装完系统,我想传文件到系统里,装了vsftpd!
用FTP软件登陆,一直无反应..
后来使用 iptables -F后,FTP可以登陆了,但重启后又无法登陆!

敲了以下两个命令,还是无法登陆!
iptables -A INPUT -p tcp --dport 20 -j ACCEPT
iptables  -A INPUT -p tcp --dport 21 -j ACCEPT

-------------------------
iptables --list 结果, 大家帮忙看看!!


Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
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  --  anywhere             anywhere            reject-with icmp-host-prohibited
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp

论坛徽章:
0
2 [报告]
发表于 2007-04-02 22:05 |只看该作者
/etc/init.d/iptables restart
modprobe ip_conntrack_ftp
iptables -I RH-Firewall-1-INPUT 9 -p tcp --dport 21 -j ACCEPT
编辑/etc/sysconfig/iptables-config,改IPTABLES_MODULES="ip_conntrack_ftp"
/etc/init.d/iptables save

论坛徽章:
0
3 [报告]
发表于 2007-04-02 22:40 |只看该作者
Thank you!

以前几乎不用IPTABLES,因为家里有无线路由,对IPTABLES,看来这回用RHEL AS5要好好熟悉一下IPTABLES喽!!

论坛徽章:
0
4 [报告]
发表于 2007-04-06 12:19 |只看该作者
LZ这样可以了么?
port
passive
FTP的两种工作方式看下
在白金版版的iptables里面有
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP