ChinaUnix.net
相关文章推荐:

linux postrouting

postrouting 链 是将本地ip地址伪装成公网ip地址 要让局域网的机器上网要允许带有内部 IP 地址的 LAN 节点和外部的公共网络通信,需要配置防火墙的 IP 伪装(IP masquerading)。这会把来自 LAN 节点的请求都伪装成防火墙的外部设备(在这个例子中是 eth0)的 IP 地址。该规则使用 NAT 分组匹配表(-t nat),并在防火墙的外部联网设备(-o eth0)上为 NAT 指定内建的 postrouting 链(-A postrouting)。postrouting 允许分组在离...

by crastyl - Linux文档专区 - 2008-10-06 13:02:43 阅读(3012) 回复(0)

相关讨论

我有一个网络环境,有一台电信的ADSL线路连接到我的IDC机房,ADSL的IP地址为 221.10.12.22,所有访问ADSL这台机器80端口的流量都被转到了一台linux机器上这台机器的IP地址为172.16.1.11,但返回的包我想走IDC机房的网通线路,我在linux服务器上配置了如下的规则 iptables -t nat -A postrouting -p tcp -o eth0 -s 172.16.1.11 --sport 80 -j SNAT --to-source 221.10.12.22 以上的这条规则,为什么不能生效呢? 当有外网访问172...

by miaho - Linux系统管理 - 2009-11-12 09:55:53 阅读(1441) 回复(6)

iptables: No chain/target/match by that name iptables: No chain/target/match by that name 可是这两项还是照常用 为什么呢? [ 本帖最后由 lovegqin 于 2006-9-29 16:36 编辑 ]

by lovegqin - 网络与硬件 - 2006-09-29 16:36:39 阅读(988) 回复(1)

iptables: No chain/target/match by that name iptables: No chain/target/match by that name 可是这两项还是照常用 为什么呢? [ 本帖最后由 lovegqin 于 2006-9-29 16:36 编辑 ]

by lovegqin - Linux系统管理 - 2006-09-29 16:36:39 阅读(1637) 回复(1)

iptables -t nat -L postrouting [root@mailgateway etc]# iptables -t nat -L postrouting Chain postrouting (policy ACCEPT) target prot opt source destination SNAT all -- 192.168.0.0/24 anywhere to:218.247.50.18 iptables -t nat -A postrouting -o ppp0 -j MASQUERADE iptables -I FORWARD -s 192.168.0.0/24 -p tcp --dport 21 -j DROP iptables -t filter -L FOR...

by snowtty - Linux文档专区 - 2006-04-30 10:26:43 阅读(1883) 回复(0)

我大概清楚一点就是从内网出去的时候用postrouting进来的时候用PREROUTING,可是做透明代理的时候确是用PREROUTING。这是为什么呢?

by redliquid - 网络与硬件 - 2006-02-15 14:04:43 阅读(826) 回复(4)

我大概清楚一点就是从内网出去的时候用postrouting进来的时候用PREROUTING,可是做透明代理的时候确是用PREROUTING。这是为什么呢?

by redliquid - Linux系统管理 - 2006-02-15 14:04:43 阅读(12706) 回复(4)

我的防火墙有三快网卡,一块对外连接internet eth0,一块接内网 eth1,一块接DMZ区域eth2。DMZ区域有公网地址。 在防火墙的iptables中有这样一条语句 /sbin/iptables -t nat -A postrouting -o eth0 -j SNAT --to-source $INET_IP 正常使用。 我现在想,DMZ区域不要做SNAT,因为他们本身都有公网ip地址,没有什么意义。防火墙本身因为也有公网地址,他本身上网也不做SNAT动作,只有办公室内部机器,也就是连接eth1的机器进行SNAT...

by maxwell_81 - 服务器架设 - 2006-01-12 07:08:55 阅读(925) 回复(6)

我的防火墙有三快网卡,一块对外连接internet eth0,一块接内网 eth1,一块接DMZ区域eth2。DMZ区域有公网地址。 在防火墙的iptables中有这样一条语句 /sbin/iptables -t nat -A postrouting -o eth0 -j SNAT --to-source $INET_IP 正常使用。 我现在想,DMZ区域不要做SNAT,因为他们本身都有公网ip地址,没有什么意义。防火墙本身因为也有公网地址,他本身上网也不做SNAT动作,只有办公室内部机器,也就是连接eth1的机器进行SNAT...

by maxwell_81 - 服务器应用 - 2006-01-12 07:08:55 阅读(1370) 回复(6)

#iptables -t nat -A postrouting -s 192.168.0.0/24 -o ppp0 -j MASQUERADE iptables: No chain/target/match by that name #iptables -t nat -A postrouting -s 192.168.0.0/24 -o ppp0 -j MASQUERADE --help MASQUERADE v1.3.1 options: --to-ports ;[-;] Port (range) to map to. 请问:哪位大虾知道 iptables 1.3.1 的PPP动态IP拨号上网网关上如何写postrouting规则? O升级了...

by abc3w - 网络与硬件 - 2005-10-11 15:33:48 阅读(1794) 回复(9)

#iptables -t nat -A postrouting -s 192.168.0.0/24 -o ppp0 -j MASQUERADE iptables: No chain/target/match by that name #iptables -t nat -A postrouting -s 192.168.0.0/24 -o ppp0 -j MASQUERADE --help MASQUERADE v1.3.1 options: --to-ports ;[-;] Port (range) to map to. 请问:哪位大虾知道 iptables 1.3.1 的PPP动态IP拨号上网网关上如何写postrouting规则? O升级了...

by abc3w - Linux系统管理 - 2005-10-11 15:33:48 阅读(1695) 回复(9)