免费注册 查看新帖 |

Chinaunix

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

Fedora 5和7 的iptables 配置问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-18 22:44 |只看该作者 |倒序浏览
Fedora 5和7  的iptables 配置问题?
以前一直用RH9,在RH9下配置iptables。可以这样配置,但在Fedora 5和7 配置一样但是不生效,
Fedora 5和7  下的iptables 如何配置?

RH9下配置iptables,脚本如下,如果在Fedora 5和7 实现?
###################
#touch /etc/rc.d/filter-firewall
#chmod u+x /etc/rc.d/filter-firewall
#echo "/etc/rc.d/filter-firewall">>/etc/rc.d/rc.local
#vi /etc/rc.d/filter-firewall
iptables -F
iptables -X
iptables -P INPUT DROP

iptables -i eth0 -A INPUT -p udp --destination-port 22 -j ACCEPT
iptables -i eth0 -A INPUT -p udp --destination-port 22 -j ACCEPT

iptables -i eth0 -A INPUT -p udp --destination-port 3306 -j ACCEPT
iptables -i eth0 -A INPUT -p tcp --destination-port 3306 -j ACCEPT
###################

论坛徽章:
0
2 [报告]
发表于 2007-10-18 23:03 |只看该作者
22号端口ssh服务是tcp协议吧

论坛徽章:
0
3 [报告]
发表于 2007-10-18 23:11 |只看该作者
iptables -i eth0 -A INPUT -p udp --destination-port 22 -j ACCEPT
iptables -i eth0 -A INPUT -p tcp --destination-port 22 -j ACCEPT

iptables -i eth0 -A INPUT -p udp --destination-port 3306 -j ACCEPT
iptables -i eth0 -A INPUT -p tcp --destination-port 3306 -j ACCEPT

写错了,不过主要是想问问在Fedora 5和7下如何配置iptables 脚本问题?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP