回文章列表
作者CIAnuts.bbs@ptt.cc (kukuku~) 看板: linux
標題[問題] iptables route target 設定問題
時間批踢踢實業 (2008/08/18 Mon 02:39:57)
小弟我安裝了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的話要設在哪呢?

--
※ 發信站: 批踢踢實業坊(ptt.cc) 
◆ From: 140.123.236.115
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻