Using HTTP proxy to determine outbound load balancer
-
Hi all,
We have 2 interfaces, 1 DSL and 1 Wireless. We don't pay for bandwidth usage on our wireless, and it has a much faster upload speed at 2 mb/s vs the DSL 128k/s. I've defined 3 load balancers, "main", "dsl-first" and "wireless-first". The "main" load balancer balances between the DSL and wireless, where as the last 2 are failover groups. I want to use something like the squid package to intercept HTTP requests and route them over a defined group based on the host. For instance, we use Amazon S3 extensively, as such I want any traffic that connects to host "amazonaws.com" to be routed through my "wireless-first" load balancer. We're taking a huge beating on our DSL bill, as well as the slow upload speeds. Is there any way to do this in pfSense 1.2.3? I've posed this question to the squid group, and below is the response i have received. It's definately possible, but does anyone know how to link squid with the load balancer?Hi all,
I'm using squid on a pfSense router we've built. We have 2
connections, one we pay for usage (DSL) and one we do not (Wireless).
We use Amazon S3 extensively at work. We've been attempting to route
all traffic over the wireless via an IP range, but as S3 can change IPs,
this doesn't work and we end up with a large bill for our DSL. Is it
possible to have squid route connections via a specific interface if a
hostname such as "amazonaws.com" is in the HTTP request header?Thanks,
ToddYes you can.
Find an IP assigned to the interface you want traffic to go out. Use the
tcp_outgoing_addr directive and ACLs that match the requests to make sure
all the requests to that domain are assigned that outgoing address. Then
make sure the OS sends traffic from that IP out the right interface.Amos
Thanks,
Todd -
Just a follow up, I have the following rules that work, but they don't use the Load balancers I've set up. Is there a device path or something similar I could substituted in the rules below?
Thanks,
Todd#Set up our ACL for high throughput sites;
acl high_throughput dstdomain .amazonaws.com .rapidshare.com .apple.com .windowsupdate.com .update.microsoft.com;#Bind high throughput to the wireless interface;
tcp_outgoing_address 116.90.140.xx high_throughput;#Set up ACL for DSL always;
acl DSL dstdomain .spidertracks.com;
tcp_outgoing_address 203.114.178.xxx DSL;