From mboxrd@z Thu Jan 1 00:00:00 1970 From: Javier Charne Date: Mon, 11 Jun 2007 19:23:57 +0000 Subject: [LARTC] Re: multiple routing tables for internal router programs Message-Id: <466DA14D.4060503@speedy.com.ar> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Tom Diehl escribi=F3: >> > > Any possibility someone could repost this reply in english. > Sorry, Tom. My english is really awful. >> Lo que pod=E9s 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=EDs una tabla con su gateway (alguno de tus conexiones), y le pon= =E9s >> las redes que necesit=E1s 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=EDs una regla que todo paquete est=E9 marcado con un 1, use esa ta= bla >> de routeo (salga por ese gateway...) >> >> ip rule add fwmark 1 table 100 >> >> Y tambi=E9n, marc=E1s con un 1 cada paquete que quer=E9s que use esa tab= la >> (por ejemplo, el tr=E1fico web): >> >> iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 1 > > Regards, > I was saying Andrea: Try to define a new routing table, add a chain in mangle table for tagging packets and add a rule to deliver those packets to the new route. Again, I'm sorry. I didn't know this is a "english-only" list. Saludos! Javier.- _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc