title: How to direct traffic from router to squid proxy server?
body: <p>I have three boxes:  a Linux client, a OpenWRT router, and a Squid server.  I'm trying to get the client (which is connected to the router) web traffic to go through the proxy server without any client configuration.</p>
  
  <p>Using this iptables rule on the router seems to make the client traffic go to the proxy just fine (I can see the request in the access.log):</p>
  
  <pre><code>iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 80 -j DNAT --to $PROXY_IP:3128
  </code></pre>
  
  <p>But the traffic doesn't seem to make it back to the client.  I get this error on the client's web browser:</p>
  
  <blockquote>
    <p>The requested URL could not be retrieved. Invalid URL</p>
  </blockquote>
  
  <p>It almost looks like the hostname is missing by the time it get's back to the client.  Am I missing an iptables rule?  On the router or on the proxy server?  Or do I need set a route?</p>
  
  <p>My end goal is to have dansguardian running on the proxy server.  The router is not powerful enough to run the filter and that is why I have a separate server for that.</p>