Transparent Proxy Squid 3
The only thing to be done in squid.conf is:
adding the “transparent” at the end of the http_port directive
http_port 3128 transparent
and of course redirecting the traffic to the port of the proxy with a suitable iptables rule. Something like (assuming 192.168.0.1 is your proxy’s LAN IP address):
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128