LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-01-2010, 07:28 PM   #1
lukeshih
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
squid proxy with multi wan links and load balancer


hi all
my netowrk interface
eth0 wan1
eht1 wan2
ent2 wan3
eth3 lan 192.168.1.0/24

my iptable T1
wan1 ip dev eth0 scope link
192.168.1.0/24 dev eth3 scope link
default via wan1's dev eth0

iptables -t mangle -A PREROUTING -s 192.168.1.0/24 -j MARK --set-mark 1

http traffic not follow the iptables
sometime via eth1 or eth2

after squid.conf added "tcp_outgoing_address wan1's gateway"
it worked correctly

why??? what squid do???

the http traffic
192.168.1.x http resquset => iptables(nat) redirect 3128 => iptables
(mangle) mark 1
=> route table T1 => internet

why iptables can't not control the traffic

i want creat the tables T2 =>for load balancer
wna1's gateway dev eth0 scope link
wan2's gateway dev eth1 scope link
wan3's gateway dev eth3 scope link
192.168.1.0/24 dev eth3 scope link
default
nexthop via wna1's gateway dev eth0 weight 1 onlink
nexthop via wna2's gateway dev eth1 weight 1 onlink
nexthop via wna3's gateway dev eth2 weight 1 onlink

how to make squid route follow this table

thanks for any advice!!!
 
Old 03-02-2010, 09:10 AM   #2
jvaldivia
Member
 
Registered: Sep 2007
Distribution: Debian Lenny
Posts: 61
Blog Entries: 2

Rep: Reputation: 19
I don't think squid could handle the traffic shaping, what I did once was to configure IP route version 2, to have 2 internet providers, and control the access by routing, I wrote all here http://soad1982.blogspot.com/2010/02...-on-linux.html

If you just have one network behind the linux then you can just add the lines at the bottom of the configuration:

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent Proxy with 2 WAN links yorbs8 Linux - Networking 7 03-01-2010 07:32 PM
Squid Load Balancer ravis007 Fedora 1 12-08-2009 02:59 AM
Using Linux as a router and load balancer between two DSL WAN connections MikeyCarter Linux - Software 3 04-02-2009 08:26 AM
Load balancing through squid proxy server punit1985 Linux - Newbie 3 11-02-2008 01:51 AM
squid proxy: load startup? flump Linux - Software 1 08-28-2003 09:42 AM


All times are GMT -5. The time now is 05:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration