|
|
Setting Up Transparent Proxy For A Network Using Squid - Linux
|
Views : 748
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 312 .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 .
|
|
By Selva, On - 2009-04-06 |
|
|
|