Re: Routing Problem eleganter lösen
Am Freitag 11 Dezember 2009 schrieb Stefan Bauer:
> 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.
erst mal eine gute Idee. Dann muss ich allerdings verhindern das die
Antwortpakete zu internen Verbindungen dort (Tabelle 1/2) auch
einlaufen, sonst ist das interne Netz abgeklemmt (in tab1/2 steht ja nur
eine default-route).
Es sollte doch aber reichen die Priorität der beiden Tables hinter die
"main" Tabelle zu legen und die globale Default Regel (bisher noch in
main) in eine weitere extra Tabelle hinter 1 und 2 zu verpacken.
Ich werde das mal ausprobieren. Oder gibt es noch einfachere Varianten?
msc
Reply to: