Re: [squid-users] Testing transparent squid in VM

From: Wundy <>
Date: Tue, 29 Apr 2008 07:39:30 -0700 (PDT)

Amos Jeffries-2 wrote:
> You should be able to use just:
> iptables -t nat -A PREROUTING -s ! -p tcp --dport 80 -
> REDIRECT -to-port 3128
> iptables -t nat -A POSTROUTING -j MASQUERADE

At this point I have added the iptables command :
  iptables -t nat -A PREROUTING -p tcp --dport 80 -j
REDIRECT --to-port 3128
  iptables -t nat -A POSTROUTING -j MASQUERADE

but it does nothing to far.

Amos Jeffries-2 wrote:
> squid.conf:
> http_port 3128 transparent

In my squid.conf I haven't adjusted many things. You can look at it here,
should there be any more problems. squid.conf
I did however have to enable ip4_forward since that was off.
I'm not that familiar with my debian distro so stuff like that is helpful

at this point squid behaves as follows:
the browser without proxy settings does not find squid and doesn't give a
web page.
if I point the browser towards the proxy server then any address I open
loads VERY VERY slowly and times out after a few mins.

Amos Jeffries-2 wrote:
> If that still won't work:
> - Ensure that your squid has ONLY one transparent option
> (--enable-linux-netfilter) configured.
> - Check that squid is receiving requests (access.log or cache.log)
> - Check squid has access outbound (usually cache.log)
> - Check whether NAT is failing (cache.log)
squid is recieving request if I point the browser to the proxy server,
otherwise nothing.

View this message in context:
Sent from the Squid - Users mailing list archive at
Received on Tue Apr 29 2008 - 14:39:35 MDT

This archive was generated by hypermail 2.2.0 : Thu May 01 2008 - 12:00:04 MDT