[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Routing Problem eleganter lösen



Markus Schulz wrote:
> Bisher habe ich folgende Lösung gebaut:
> 
> ip route add default dev ppp0 tab 1
> ip route add default dev ppp1 tab 2
> 
> ip rule add from $ADSL_IP tab 1
> ip rule add from $SDSL_IP tab 2

Wie wärs mit ... ?

ip rule add iif ppp0 tab 1
ip rule add iif ppp1 tab 2

iif NAME
select the incoming device to match.  If the interface is  loop-
back,  the rule only matches packets originating from this host.
This means that you may create separate routing tables for  for-
warded  and local packets and, hence, completely segregate them.

Stefan

-- 
Stefan Bauer -----------------------------------------
PGP: E80A 50D5 2D46 341C A887 F05D 5C81 5858 DCEF 8C34
-------- plzk.de - Linux - because it works ----------


Reply to: