Operating System - Linux
1827792 Members
2425 Online
109969 Solutions
New Discussion

Transparent proxy settings

 
monu_1
Regular Advisor

Transparent proxy settings

Dear all,

I m using squid proxy server and firewall gateway(natting) on same machine.But problem is that when i remove proxy server ip and port(3128) infromation from client web browser it bypass proxy and getting connection with direct port 80 on gateway server.
I want to use transparent proxy so that get rid off put proxy server ip an port number on every client web browser.

what shd we change in our squid.conf and what entry we put in iptables that evry http request must go through port 3128?

eth0 =public ip(xxx.xxx.xxx.xxx)
eth1 =private lan ip(192.168.0.2)

Thanks in advanced
MKS
1 REPLY 1
Stuart Browne
Honored Contributor

Re: Transparent proxy settings

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

Coupled with squid config:

http://www.deckle.co.za/squid-users-guide/Transparent_Caching/Proxy

Or http://www.cyberciti.biz/tips/linux-setup-transparent-proxy-squid-howto.html

One long-haired git at your service...