SQUID transparent proxy
Transparent proxy
The transparent proxy provides the same service function as the traditional proxy, but its "transparent" implementation depends on the default route and firewall redirection strategy, so it is more suitable for serving LAN hosts than for clients in INTERNET.
Configure SQUID to support transparent proxy
The default configuration of the SQUID service does not support transparent proxies, so you need to adjust the settings. For SQUID services above version 2.6, transparent proxies can be supported by adding a "transparent" option to the http_port configuration line.
* vim / etc/squid.conf**httpport 192.168.. 4.1 IP 3128 transparent / / only provides services at one of the service squid reload* addresses * *
Set the redirection policy for IPTABLES
Iptables-t nat-I PREROUTING-I eth2-s 192.168.10 tcp 24-p tcp-- dport 80-j REDIRECT-- to 3128iptables-t nat-I PREROUTING-I eth2-s 192.168.10 PREROUTING-- dport 443-j REDIRECT-- to 3128service iptables save
Verify the use of transparent proxies
Unset HTTP_PROXY HTTPS_PROXY