Rel5 under the transparent proxy configuration tutorial

  
 

Transparent proxy: The client does not need to manually set the proxy in the browser, reduce the client's work, directly use the proxy server specified by the nat server in the firewall rule to access the Internet

Setting the hardware,

Nat server 2 network card, eth0 is connected to the internal network, eth1 is connected to adsl dialing, after dialing is ppp0 interface

single squid proxy server ip 192.168.0.200

1:iptables

echo 1>/proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUEADE

Note: The configuration below is configured to select One of the configurations

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 (nat and squid belong to the same machine)

Iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-dest 192.168.0.200:3128 (This configuration is squid is another machine, separated from nat)

2: Squid proxy configuration

httpd_port 3128 transparent (key row)

Other configurations skip

This transparent proxy with linux is ok.

Copyright © Windows knowledge All Rights Reserved