[squid-users] How does squid work between a firewall and a web server in the transparent proxy mode

From: yjyj <yangjing001001_at_gmail.com>
Date: Tue, 2 Feb 2010 11:25:21 +0800

Hi,

I want to use the squid as a transparent bridge proxy, which is put
behind a firewall and in front of a web server. The web server works
in a local net with a different port from that clients visits, so the
firewall need to do nat and port mapping.

The environment looks like below:

Internet <--->(1.2.3.4:80)firewall(192.168.1.1)<---->squid(192.168.1.101:3128)<--->web
server(192.168.1.100:8000)

I use the iptables rule following to make the squid process http requests:
iptables -t nat -A PREROUTING -i br_name -p tcp -d 192.168.1.100
--dport:8000 -j REDIRECT --to-port:3128

However, I found that squid can not establish a conncetion with the
web server, because that in the http request which squid has received
the host info is 1.2.3.4. So the squid will try to forward the request
to 1.2.3.4 not 192.168.1.100.

Is there anyone know how to configure the squid to work in such kind
of environment?

Thanks a lot!

YangJing
Received on Tue Feb 02 2010 - 03:25:33 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 02 2010 - 12:00:03 MST