LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: bigmouth

怎么用iptables配置共享互联网访问

[复制链接]
发表于 2003-6-15 14:08:09 | 显示全部楼层
我现在用不了linux,所以问一下,如果我什么规则都不添加那么POSTROUTTIN規則鍊能做些什么?
发表于 2003-6-15 16:24:38 | 显示全部楼层

这是我的

>iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

默认的情况
发表于 2003-6-15 17:33:05 | 显示全部楼层
奇怪,我看资料说是nat表只有两条规则链POSTROUTING和PREROUTING。怎么会有个OUTPUT
发表于 2003-6-15 17:58:35 | 显示全部楼层
The nat table is used mainly for Network Address Translation. "NAT"ed packets get their IP addresses altered, according to our rules. Packets in a stream only traverse this table once. We assume that the first packet of a stream is allowed. The rest of the packets in the same stream are automatically "NAT"ed or Masqueraded etc, and will be subject to the same actions as the first packet. These will, in other words, not go through this table again, but will nevertheless be treated like the first packet in the stream. This is the main reason why you should not do any filtering in this table, which we will discuss at greater length further on. The PREROUTING chain is used to alter packets as soon as they get in to the firewall. The OUTPUT chain is used for altering locally generated packets (i.e., on the firewall) before they get to the routing decision. Finally we have the POSTROUTING chain which is used to alter packets just as they are about to leave the firewall.
发表于 2003-6-15 18:06:42 | 显示全部楼层
html代码被禁止了,这个帖子显示不出来了
发表于 2003-6-15 18:09:18 | 显示全部楼层
本来想弄个有关output的一张说明表格,却发现不能用html代码
不好意思
发表于 2003-6-15 18:20:15 | 显示全部楼层
那你能不能做成网页发给我?我的邮箱是alexgoal@163.com谢谢了。
发表于 2003-6-15 19:15:14 | 显示全部楼层
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=44900
在这里,我也是从这里下载的,发现不错
发表于 2003-6-15 20:45:23 | 显示全部楼层
最初由 pupilzeng 发表
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=44900
在这里,我也是从这里下载的,发现不错

不错啊!
发表于 2003-6-16 21:31:53 | 显示全部楼层
为什么我用iptables -t nat -A POSTROUTTIN -s 192.168.0.0/24 -j MASQUERADE时出现iptables: Invalld argument的错误呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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