From: the sew Date: Thu, 09 Feb 2006 12:57:47 +0000 Subject: Re: [LARTC] Routing packges by destination port Message-Id: MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1364913630==" List-Id: References: <002401c62c9c$7401c070$0e001eac@NATANIEL> In-Reply-To: <002401c62c9c$7401c070$0e001eac@NATANIEL> To: lartc@vger.kernel.org --===============1364913630== Content-Type: multipart/alternative; boundary="----=_Part_4196_24553726.1139489867705" ------=_Part_4196_24553726.1139489867705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi, I have similiar setup, but I load balance my proxy, 2 ways I would try with iproute2 off the top of my head 1) ip rule add from x.x.x.x table out1 ip route add default dev eth1 table out where x.x.x.x is the ip of your transparent ip 2) I would do what you did with port 80 just the other way around have a default route of eth1 and have a "iptables -t mangle -A PREROUTING ! -p tcp --dport 80 -j MARK etc" rule where u mark everyhing except port 80 through eth0 ( check the NOT in the iptables command) hope this helps Sew On 2/8/06, Nataniel Klug wrote: > > Hello all, > > After many time reading a lot of stuff I am quite confident using > LARTC > to route my trafic. I am still working on QoS (by package type and so on) > but it will stay in my studing class for a long time... ;) > > So lets go to my question... I mounted a router that makes my > conections > throug 2 external interfaces. > > Its working fine and my default gateway for entire network behind it > (nated) is the link at interface eth0. > > All traffic going to port 80 is maked as 0x1 and I route it to a tabl= e > that makes its default route trhough link2 (eth3). > > My problem begins when I try to use transparent proxy (squid) with > this > rule: > > iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -p tcp -m tcp --dport 80 > -j > REDIRECT --to-ports 3128 > > If I make this rule my routing tables begins to scramble all my > traffic > and makes it going ALL through only 1 link (eth0). There is anyway to use > transparent squid with multiple routing tables and marking packages? > > PS.: What is this error "Icmp checksum is wrong" > > Att, > > Nataniel Klug > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > ------=_Part_4196_24553726.1139489867705 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi,

I have similiar setup, but I load balance my proxy,

2 ways I would try with iproute2 off the top of my head

1)
ip rule add from x.x.x.x table out1
ip route add default dev eth1 table out

where x.x.x.x is the ip of your transparent ip

2) I would do what you did with port 80 just the other way around
have a default route of eth1 and have a "iptables -t mangle -A PREROUTING ! -p tcp --dport 80 -j MARK etc" rule where u mark everyhin= g except port 80 through eth0 ( check the NOT in the iptables command)

hope this helps

Sew





On 2/8/06, Nataniel Klug <nata@cnett.co= m.br> wrote:
    Hello all,

    After man= y time reading a lot of stuff I am quite confident using LARTC
to route = my trafic. I am still working on QoS (by package type and so on)
but it = will stay in my studing class for a long time... ;)

    So lets go to my question... I mounted a ro= uter that makes my conections
throug 2 external interfaces.

 = ;   Its working fine and my default gateway for entire netwo= rk behind it
(nated) is the link at interface eth0.

    All traffic going to port 80 is maked as 0x= 1 and I route it to a table
that makes its default route trhough link2 (= eth3).

    My problem begins when I try to use t= ransparent proxy (squid) with this
rule:

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -p tcp -m tcp --dport 80 -j
REDIRECT --to-ports= 3128

    If I make this rule my routing tables = begins to scramble all my traffic
and makes it going ALL through only 1 link (eth0). There is anyway to u= se
transparent squid with multiple routing tables and marking packages?<= br>
PS.: What is this error "Icmp checksum is wrong"

Att,

Nataniel Klug

__________________________________________= _____
LARTC mailing list
LAR= TC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
<= /div>
------=_Part_4196_24553726.1139489867705-- --===============1364913630== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1364913630==--