<div dir="ltr"><span style="font-size:12.8000001907349px">Hello all,</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I'm trying my hands with openvswitch and squid. This is what I want to achieve.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">The client tries to connect to the server. This packet is handled through an openvswitch and it's sent to a machine running squid for proxying. The machine running squid sees the packet with client to server but iptables rules help in delivering this packet up the stack. On a cache hit, squid responds back to the client and also installs iptables rules on the fly and hence the source IP is that of the server.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">This is achieved through the following configuration in squid.conf.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">http_port 3128 intercept</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">With this configuration however, on a cache miss case, squid uses it's IP address as the source IP to connect to the server. What I expect is squid to use the client's IP address to establish this new connection to the server. From the squid.conf, I believe I need to use the tproxy mode with the http_port directive, but I'm stumped about what iptables rules to configure.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I'm trying to follow the steps here (<a href="http://wiki.squid-cache.org/Features/Tproxy4#Feature:_TPROXY_version_4.1.2B-_Support" target="_blank">http://wiki.squid-cache.org/Features/Tproxy4#Feature:_TPROXY_version_4.1.2B-_Support</a>) but no luck yet. And I don't understand why I'd need to use WCCP for something like this.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I expect squid to use the client's IP address and the reverse traffic from the server will make it's way to squid's box through openvswitch. All squid has to do is install an iptable rule on the fly for the outgoing connection to use the client's IP address and also have a corresponding reverse rule to translate from the client's IP address to squid's IP address.<br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">The kernel that I'm using is 3.16 and it has the nf_conntrack and xt_TPROXY modules insmoded. Can someone help me with this?</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Thanks,</div><div style="font-size:12.8000001907349px">Srinath</div></div>