On Wed, May 20, 2009 at 3:06 AM, Chris Robertson <crobertson@xxxxxxx> wrote: > RSCL Mumbai wrote: >> >> On Sun, May 17, 2009 at 11:37 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> >> wrote: >> >>> >>> RSCL Mumbai wrote: >>>> >>>> I tried " tcp_outgoing_address " by adding the following to squid.conf >>>> >>>> acl ip1 myip 10.0.0.120 >>>> acl ip2 myip 10.0.0.121 >>>> acl ip3 myip 10.0.0.122 >>>> tcp_outgoing_address 10.0.0.120 ip1 >>>> tcp_outgoing_address 10.0.0.121 ip2 >>>> tcp_outgoing_address 10.0.0.122 ip3 >>>> >>>> Restarted squid, but no help. >>>> >>>> Pls help how I can get the route rules to work. >>>> >>>> Simple requirement: >>>> If packets comes from src=10.0.0.120, forward it via ISP-1 >>>> If packets comes from src=10.0.0.121, forward it via ISP-2 >>>> If packets comes from src=10.0.0.122, forward it via ISP-3 >>>> And so forth. >>>> >>>> Thx in advance. >>>> Vai >>>> >>> >>> To prevent the first (default) one being used you may need to do: >>> >>> tcp_outgoing_address 10.0.0.120 ip1 !ip2 !ip3 >>> tcp_outgoing_address 10.0.0.121 ip2 !ip1 !ip3 >>> tcp_outgoing_address 10.0.0.122 ip3 !ip1 !ip2 >>> >> >> >> I do not have 5 real interfaces for 5 ISPs. >> And I believe virtual interfaces will not work in this scenario. >> > > Works for me (Squid 2.7, Linux kernel 2.6.9+, one physical interface, two > IPs) Be sure to set "server_persistent_connections off" in your squid.conf. I have them off. My squid.conf as below.... ~~~~~~~~~~ client_persistent_connections off server_persistent_connections off ~~~~~~~~~~ Chris, if possible, can you pls share your acl rules for "tcp_outgoing_address". Just want to make sure my rules are correct. I tried with 2 nics and it did not work. Also, I have to manage 5 ISPs. I do not have the possibility of adding 5 lan cards in my server. I read on the net that IPTables and route2 do not support virtual interfaces. Looks like I have limited / no options here. Thx. Vai