Skip to contentSkip to conversation

LARTC Digest, Vol 20, Issue 4

LARTC Indunil Jayasooriya 2 participants 2 messages Oct 5, 2006 – Oct 6, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I think you now have 2 Links to the internet. You want to route web traffic (transparent proxy triffic) via one link and the rest via the other link.

If it is the case, It is possible to do. I have done it.

here I have mentioned eth0 and eth1
eth0 is connected to one link (link1)
eth1 is connected to other link (link2) , via this link, web traffic will be routed.

echo 210 link1 >> /etc/iproute2/rt_tables
echo 211 link2 >> /etc/iproute2/rt_tables

ip route add ipaddressofonegateway dev eth0 table link1 ip route add default via ipaddressofonegateway dev eth0 table link1

ip route add ipaddressoftheohtergateway dev eth1 table link2 ip route add default via ipaddressoftheohtergateway dev eth1 table link2

iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK --set-mark 1

ip rule add fwmark 1 pri 100 table link2

iptables -t nat -o eth1 -j SNAT --to-source ipaddressofeh1

echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter

ip rule add from ipaddressofeth0 pri 200 table link1 ip rule add from ipaddressofeth1 pri 300 table link2

that's it.

and also , you can reffer to this URL

http://www.debian-administration.org/articles/379

Quoted 96 lines · On 10/4/06, [email protected] < [email protected]>…

Send LARTC mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of LARTC digest..."

Today's Topics:

1. Cant get transparent proxy to route out new ISP. (Brent Clark)
2. ipp2p not work in iptables-1.3.6 (sonu chouhan)

----------------------------------------------------------------------

Message: 1
Date: Tue, 03 Oct 2006 13:49:00 +0200
From: Brent Clark <[email protected]>
Subject: [LARTC] Cant get transparent proxy to route out new ISP.
To: [email protected]
Message-ID: < [email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi all

Could someone please me with my current setup.

I just got another DSL line and I have my routing and marking the packets etc so that I can decided the fate as to which ISP I would like to route my traffic out of etc.

I managed to get squid to be used as a trasparent proxy, but im forced to use the default gw of the machine and for the likes of my I cant figure out to
send traffic out the new ISP.

So my question / request for help is, Would anyone please advise me as to how I can choose what ISP I can route my transparent proxy.

I was thinking that maybe it is a POSTROUTING marking that I need to do, and the the routing tables will take care of the rest.

Kinds Regards and thank you in advance.

Brent Clark

------------------------------

Message: 2
Date: Tue, 3 Oct 2006 10:18:15 -0700 (PDT)
From: sonu chouhan < [email protected]>
Subject: [LARTC] ipp2p not work in iptables-1.3.6
To: [email protected]
Message-ID: < [email protected]>
Content-Type: text/plain; charset="iso-8859-1"

hi all,
I had compiled iptables 1.3.6 on my redhat enterprises linux-4 box with
kernel 2.6.16.17, but in this setup ipp2p-0.8.2 not working after upgrade of iptables from 1.3.5 to 1.3.6, so plz help me out.
thanks in advance

sonu...

---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail. -------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mailman.ds9a.nl/pipermail/lartc/attachments/20061003/6c311ee8/attachment.html

------------------------------

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

End of LARTC Digest, Vol 20, Issue 4
************************************

Signature · 2 lines
Thank you
Indunil Jayasooriya

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw

[LARTC] Re: LARTC Digest, Vol 20, Issue 7

Quoted 18 lines

Message: 1
Date: Fri, 06 Oct 2006 00:06:08 -0400
From: Kevin White <[email protected]>
Subject: [LARTC] Two upstream gateways, only use one unless it fails?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I'm looking at setting up a system with two upstream Internet routers, the second to be used only if the first fails.

There's a lot of information on using Julian's patches (the nano document), and I'm still digesting all of it. It looks pretty slick, and I think it will work...but I don't see if I can actually set up multipath and have the kernel not use the second interface unless it has to. It looks like I can only set weight and set up a percentage rule.

Quoted 6 lines

Am I missing something? Can I say "here are two routes, always use route one unless you can't?"

Thanks,

Kevin

Hi Kevin

You can use multipath with different weights see below taken from lartc.org...

############### cute##################
4.2.2. Load balancing
The second question is how to balance traffic going out over the two providers. This is actually not hard if you already have set up split access as above.

Instead of choosing one of the two providers as your default route, you
now set up the default route to be a multipath route. In the default kernel this will balance routes over the two providers. It is done as follows (once more building on the example in the section on split-access):

	    ip route add default scope global nexthop via $P1 dev $IF1 weight 1 \
	    nexthop via $P2 dev $IF2 weight 1

This will balance the routes over both providers. The weight parameters can be tweaked to favor one provider over the other. ####################cute######################

Then you can do something like this:
ip route add default scope global nexthop via $P1 dev $IF1 weight 100 \

	    nexthop via $P2 dev $IF2 weight 1		    ^^^^^^^^^^	
Quoted 1 line

************************************

best regards

Signature · 3 lines
Paulo Ricardo Bruck - consultor
Contato Global Solutions - http://www.contato.com.br
fone 011 5031-4932 011 5034-1732 cel 011 9235-4327

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc