Squid proxy server (2)

                                                                   搭建透明代理服务器
1、实验拓扑

Squid proxy server (2)
2. Experimental steps (refer to the previous traditional proxy for the installation steps, and the IP address configuration is omitted)
1) Configure squid to support transparent proxy
Vi /etc/squid.conf
Squid proxy server (2)
Modify the above line and you can
modify it and don’t forget to reload the squid service
Squid proxy server (2)
2 ) Enable routing forwarding on server B
Squid proxy server (2)
3) Configure firewall redirection

Iptables -t nat -I PREROUTING -i eth1 -s 192.168.4.0/24 -p tcp --dport 80 -j REDIRECT --to 3128
Squid proxy server (2)
Service iptables save
4) Access the website on the client (gateway must be configured)
Squid proxy server (2)
Squid proxy server (2)
on the server The visitor viewed on A is the proxy server 172.16.16.1, indicating that the experiment is correct.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326875836&siteId=291194637