iptables route target 設定問題 - Linux

By Dorothy
at 2008-08-18T02:39
at 2008-08-18T02:39
Table of Contents
小弟我安裝了patch-o-matic-ng裡面所提供的 ROUTE target
目的是為了把封包導向到所指定的介面上。說明如下
The target can be or not a final target. It has to be used inside the
mangle table.
ROUTE target options:
--oif ifname Send the packet out using `ifname' network interface.
--iif ifname Change the packet's incoming interface to `ifname'.
--gw ip Route the packet via this gateway.
--continue Route the packet and continue traversing the rules.
--tee Route a copy of the packet, but continue traversing
the rules with the original packet, undisturbed.
但是目前遇到一個問題,只要在PREROUTING內設定之後會發現整個網路都不動了...。
例如 iptables -t mangle -A PREROUTING -p icmp -j ROUTING --oif eth0
之後再ping就會發現ping不出去...。 但是設在POSTROUTING則不會發生此問題。
不過好像也就單純把封包丟向eth0而已,就算source ip不是eth0的ip也不會去重填封包的
source ip。
設在PREROUTING網路就不通有辦法解決嗎?
又如果希望能夠做到可以重填source ip的話要設在哪呢?
--
目的是為了把封包導向到所指定的介面上。說明如下
The target can be or not a final target. It has to be used inside the
mangle table.
ROUTE target options:
--oif ifname Send the packet out using `ifname' network interface.
--iif ifname Change the packet's incoming interface to `ifname'.
--gw ip Route the packet via this gateway.
--continue Route the packet and continue traversing the rules.
--tee Route a copy of the packet, but continue traversing
the rules with the original packet, undisturbed.
但是目前遇到一個問題,只要在PREROUTING內設定之後會發現整個網路都不動了...。
例如 iptables -t mangle -A PREROUTING -p icmp -j ROUTING --oif eth0
之後再ping就會發現ping不出去...。 但是設在POSTROUTING則不會發生此問題。
不過好像也就單純把封包丟向eth0而已,就算source ip不是eth0的ip也不會去重填封包的
source ip。
設在PREROUTING網路就不通有辦法解決嗎?
又如果希望能夠做到可以重填source ip的話要設在哪呢?
--
Tags:
Linux
All Comments
Related Posts
apt-get install ,有辦法可看到軟體的版本嗎?

By Lily
at 2008-08-18T01:33
at 2008-08-18T01:33
關於Linux的證照(LPI)

By Suhail Hany
at 2008-08-18T00:12
at 2008-08-18T00:12
兩個關於ubuntu 8.04安裝的問題

By Odelette
at 2008-08-18T00:09
at 2008-08-18T00:09
CP950 in kernel 2.4

By Bethany
at 2008-08-17T23:56
at 2008-08-17T23:56
ubuntu8.04連線問題

By Brianna
at 2008-08-17T23:22
at 2008-08-17T23:22