All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Re: multiple routing tables for internal router programs
@ 2007-06-11 19:06 Tom Diehl
  2007-06-11 19:23 ` Javier Charne
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Tom Diehl @ 2007-06-11 19:06 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2170 bytes --]

On Mon, 11 Jun 2007, Javier Charne wrote:

> Andrea escribió:
>> Maybe a strange request, I'll try to explain this as clearer as I can
>> (forgive my bad english, please  :-)  ).
>>
> Está permitido responder en castellano en esta lista?
>> I'm setting a linux box as a router. My router uses multiple routing
>> tables, so I can address the traffic from specific ip addresses of my
>> lan to distinct ISPs providers (specifying a different default gateway
>> fo r each table), marking packets with iptables (prerouting marks).
>>
>> This works with the forwarding traffic (lan-ISPs) that crosses my router.
>>
>> But how can I reach the same result for programs/services that are
>> working INTO the linux box? All I want is that a program (ping, for
>> examples, or a VOIP server, better) uses a secondary routing table in
>> the same machine. In this mode, I can manipulate route settings for
>> different classes of program in my router.
>>
>

Any possibility someone could repost this reply in english.

> Lo que podés hacer es "marcar" los paquetes mediante iptables -t mangle
> y luego definir reglas (ip rule) para routear cada paquete de acuerdo a
> la marca que tenga, por las tablas (ip route) que tengas definidas.
>
> Por ejemplo:
> Definís una tabla con su gateway (alguno de tus conexiones), y le ponés
> las redes que necesitás sean "conocidas" en la tabla:
>
> ip route add 127.0.0.0/8   dev lo          scope link table 100
> ip route add $NET_INTERNA  dev $IF_INTERNA scope link table 100
> ip route add $NET_ADSL1    dev $IF_ADSL2   scope link table 100
> ip route add $NET_ADSL2    dev $IF_ADSL2   scope link table 100
> ip route add default dev $IF_ADSL2 via $GW_ADSL2 table 100
>
>
> Definís una regla que todo paquete esté marcado con un 1, use esa tabla
> de routeo (salga por ese gateway...)
>
> ip rule add fwmark 1 table 100
>
> Y también, marcás con un 1 cada paquete que querés que use esa tabla
> (por ejemplo, el tráfico web):
>
> iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 1

Regards,

-- 
Tom Diehl		tdiehl@rogueind.com		Spamtrap address mtd123@rogueind.com

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-06-15  9:36 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-11 19:06 [LARTC] Re: multiple routing tables for internal router programs Tom Diehl
2007-06-11 19:23 ` Javier Charne
2007-06-12  7:59 ` Andrea
2007-06-12  8:09 ` Salim S I
2007-06-12  9:01 ` Peter Rabbitson
2007-06-12  9:15 ` Andrea
2007-06-12  9:29 ` Peter Rabbitson
2007-06-12  9:49 ` Salim S I
2007-06-12 10:02 ` Peter Rabbitson
2007-06-12 10:10 ` Andrea
2007-06-12 10:20 ` Salim S I
2007-06-12 11:23 ` Peter Rabbitson
2007-06-13  4:08 ` Salim S I
2007-06-14  3:50 ` Salim S I
2007-06-14  4:23 ` Alex Samad
2007-06-14  7:26 ` Peter Rabbitson
2007-06-14 10:34 ` Salim S I
2007-06-15  3:26 ` Salim S I
2007-06-15  6:00 ` Peter Rabbitson
2007-06-15  6:01 ` Peter Rabbitson
2007-06-15  6:21 ` Salim S I
2007-06-15  6:29 ` Peter Rabbitson
2007-06-15  9:36 ` Salim S I

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.