搭建透明代理服务器
1、实验拓扑
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
Modify the above line and you can
modify it and don’t forget to reload the squid service
2 ) Enable routing forwarding on server B
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
Service iptables save
4) Access the website on the client (gateway must be configured)
on the server The visitor viewed on A is the proxy server 172.16.16.1, indicating that the experiment is correct.