Get the App
SLTechnology News&Howtos  ›  Servers  › 

SQUID transparent proxy

Shulou Source: shulou.com Published: 2022-06-03 05:10:46 11月12日 Update

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

Tags: Agent service support configuration policy consistency discomfort host host service tradition function address client client local area network service function version routing firewall Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Redmi Linux Shulou Information