Setting Up Transparent Proxy For A Network Using Squid

by Selva 2009-04-06 19:38:22

Transparent Proxy

Transparent Proxy means making all clients in your network to use proxy server (squid) for accessing the web ,eventhough the clients have not configured proxy in their browser.

Configuring Transparent Proxy

To setup Tranparent Proxy,you must configure two things in gateway machine : firewall (iptables) and Squid

Firewall (iptables) Configuration:

In iptables you must use NAT to redirect http request(port 80) from clients to squid server (port 312Cool
.This is done by following iptable rule :

iptables -t nat -A PREROUTING -i eth1 -dport 80 -j REDIRECT --to-port 3128


here -i eth1 specifies that your clients are connected to server(gateway) through interface eth1.

Squid Configuration :

The squid have small change,while configuring it as Transparent Proxy :

open the squid configuration file /etc/squid/squid.conf and change the line http_port 3128 as http_port 3128 transparent.

Now you have Transparent Proxy running on successfully in your gateway and all http request from your network passes thorugh squid .

Tagged in:

2831
like
0
dislike
0
mail
flag

You must LOGIN to add comments