首页 > commenting > 搞定iptables

搞定iptables

2004年11月28日 hufey

家里的两台电脑,都是双系统。
XP自带的防火墙和NAT功能很不错
Linux的就要自己设了
惭愧的是一直也不会设
每次google出iptables的设置就头大了
今天正好刚装完FC3在yum update
另外一台笔记本上不了网
硬着头皮再google一次
好些文章照做了都不管用
终于翻了google几十页之后找到问题所在
把下文中加蓝部分放到我的/etc/sysconfig/iptables里才终于对了

修改/etc/sysconfig/iptables(把原有的内容都删除),修改完如下
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
*mangle :P REROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0] :P OSTROUTING ACCEPT [0:0]

*nat :P REROUTING ACCEPT [0:0] :P OSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
[0:0]-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT

分类: commenting 标签:
本文的评论功能被关闭了.