[squid-users] Squid / IPTables to forward out another interface

From: Thomas Sweatt <tsweatt@dont-contact.us>
Date: Wed, 17 Sep 2003 11:52:08 -0500

I've got Squid set up to function as a transparent proxy, and want to
send the http requests that Squid is intercepting out of a different
interface than the default.

     Essentially, I have a cable connection to the internet on
eth0(12.xxx.xxx.3) set as the default route. I have a connection to a
Campus LAN that provides access to the internet as well(10.176.9.21,
with a gateway of 10.176.1.1 on eth1), and to have more cable bandwidth
available, I want to send all http requests that come from my DMZ
(eth2). I could make eth1 the default connection, but because so much
traffic is going to be sent out the cable connection, it would require
alot of rules, as opposed to just one ruleset regarding http traffic.

 Is this possible using Squid / IPTables? I've posted on the Shorewall
lists, as thats what I use on the firewall (Squid runs on the firewall,
btw). I'm not quite sure where I need to go next.

Destination Gateway Genmask Flags Metric Ref Use
Iface
MAGICBOX 10.176.1.1 255.255.255.255 UGH 0 0 0
eth1
10.176.0.0 10.176.1.1 255.255.255.255 UGH 0 0 0
eth1
192.168.1.0 * 255.255.255.0 U 0 0 0
eth2
12.221.132.0 * 255.255.252.0 U 0 0 0
eth0
10.176.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default 12-221-132-1.cl 0.0.0.0 UG 0 0 0
eth0

All http (tcp port 80) traffic coming from eth2 is redirected to port
3128 on the firewall, but how can I specify that all traffic sent to
port 3128 should be sent out eth1? Any help anyone can provide would be
much appriciated.

Thomas Sweatt
Scretary, Alpha Lambda
Delta Sigma Phi
Webmaster, http://www.atozrenovations.net
Received on Wed Sep 17 2003 - 10:52:25 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:19:55 MST