Posted in Howto Linux Proxy
Squid 2.6 : transparent proxy
I was explaining in this article how to enable the transparent proxy feature under Squid 2.5.
The following options required for transparent proxy are no longer available under Squid 2.6 :
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
The new option under Squid 2.6 is the much simpler :
http_port 8080 transparent
You just need to append “transparent” to the http_port option line.
If you upgrade to Squid 2.6 and don’t update your config file you should get the following in the logs :
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 51 unrecognized: 'httpd_accel_host virtual'
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 52 unrecognized: 'httpd_accel_port 80'
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 53 unrecognized: 'httpd_accel_with_proxy on'
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 54 unrecognized: 'httpd_accel_uses_host_header on'
Comments
Dave Wilson
What about iptables… I tried to set up the port redirection with this:
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 3128
but to no avail… Any ideas?
Thanks,
Dave
Sébastien Wains
Hi Dave,
What do the logs say ? Do you see the attempts in squid logs.
Do you get squid error messages in your browser ?
Thanks
Seb
glenn
For squid versions 2.6 and above, you must add:
http_port 3128 transparent
instead of
#http_port 3128
to make this work.
noiz
hi there,
is there anywhere i could use the proxy squid for pop3 and smtp port.
thanks,
regards,
nazrin
Seb
squid is designed for proxying web traffic. I guess you need to add a rule in your firewall to allow pop3 and stmp traffic.
jolland h. castro
hi.. how about iptables? how to install it in windows xp.. please help.. tnx a lot…
Sébastien Wains
iptables configuration is described in the linked article.
Windows XP ? uh
Leave Comment
Please consider visiting the partners below if you enjoyed this article :If this post saved you time and money, please consider checking my Amazon wishlist.







Sébastien Wains homepage » Transparent Squid proxy
[...] http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/ [...]