Transparent Squid : Logging client ip problem

Posted by llazzaro on Server Fault See other posts from Server Fault or by llazzaro
Published on 2010-02-16T02:13:25Z Indexed on 2010/03/22 22:01 UTC
Read the original article Hit count: 464

Hello, I am using the following rules in iptables in my network to use a transparent proxy

* iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp --dport 80 -j DNAT --to squid-box:3128
* iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j SNAT --to iptables-box
* iptables -A FORWARD -s local-network -d squid-box -i eth0 -o eth0 -p tcp --dport 3128 -j ACCEPT

But my squid log, always logs gateway IP (172.16.0.1)

Do you know an alternative to not lose client IP? (of course avoid saing manual proxy setup!)

© Server Fault or respective owner

Related posts about iptables

Related posts about squid