Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2002 03:34:34 -0500
From:      "Bob Hall" <rjhalljr@starpower.net>
To:        FreeBSD Questions List <freebsd-questions@freebsd.org>
Subject:   Squid & transparent proxy
Message-ID:  <20021207083434.GA26544@sten.alder.net>

next in thread | raw e-mail | index | archive | help
I'm trying to set squid up as a transparent proxy. I'm able to 
do everything except the transparent part. If I point a web 
browser at squid, everything works fine. But it won't work 
transparently.

FreeBSD 4.4
squid-2.5_1

# ipfw l
00049 allow tcp from 192.168.0.1 to any
00050 divert 8668 ip from any to any via ppp0
65000 allow ip from any to any
65000 allow ip from any to any
65535 deny ip from any to any

Standard squid configuration.
http_port 3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

I can run a web browser on the cache machine with configuring it 
for the cache, and it uses the cache (entry in access.log). I can 
point a web browser on another machine at squid, and it uses the 
cache (another entry in access.log). But if I don't manually 
configure the browser on the other host, ipfw -t l shows that 
rule 00050 was matched, but there's no entry in the access log. 


I've tried the following three versions of rule 50, with the same 
result:
${fwcmd} add 50 fwd 127.0.0.1 tcp from any to any 80
${fwcmd} add 50 fwd 127.0.0.1,3128 tcp from any to any 80
${fwcmd} add 50 fwd 192.168.0.1,3128 tcp from 192.168.0.0/24 to any 80

When I sh /etc/rc.firewall and then then test squid again, I still 
can't get transparent proxying, except on the machine that squid 
runs on.

Bob Hall

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021207083434.GA26544>