Re: transparent proxy in BSD

From: Q <q@dont-contact.us>
Date: Fri, 25 Sep 1998 11:34:30 +1000 (EST)

This stuff is now covered in:
http://squid.nlanr.net/Squid/FAQ/FAQ-17.html#ss17.1

> I'm using BSDI 3.0 O/S , ipnat 3.2.9 and squid 2.2,
> I've installed and configured nat successfully ,
> my nat conf is
>
> rdr ef0 0.0.0.0/0 port 80 -> proxy.server port 3128 tcp

Be careful here... without redirecting direct web requests you can send
squid into a loop. (Although I believe there is code to prevent this now)

I would suggest prepending an additional rule like this anyway:
rdr ef0 1.2.3.4/32 port 80 -> 127.0.0.1 port 80 tcp

> squid.conf also configured as :
>
> httpd_port 3128 , httpd_access virtual 328
> httpd_accel virtual 3128 ,

For squid 2.2 make sure you have:

http_port 3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

> but the squid access.log still doesnt process the packet.
> Did i miss something here ?

Also check the cache.log file to see if you are getting any errors.

Note that squid will only be using host headers to do your transparent
proxy unless you make ipfilter specific changes (which will be in the next
beta release of 2.2). Without these changes, testing the transparent
proxy with telnet won't work like you would expect, but netscape will (for
version 3.x and up) because it sends a host header with each request.

In order to support requests not containing a host header, you might want
to apply an ipfilter transparent proxy patch from
http://www.fan.net.au/~q/squid until the next version of squid 2.2 comes
out.

Seeya...Q

               -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                        
                          _____ / Quinton Dolan - q@fan.net.au
  __ __/ / / __/ / / Systems Administrator
     / __ / _/ / / Fast Access Network
  __/ __/ __/ ____/ / - / Gold Coast, QLD, Australia
                    _______ / Ph: +61 7 5574 1050
                           \_\ SAGE-AU Member
Received on Thu Sep 24 1998 - 18:35:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:11 MST