title: Linux squid proxy configuration
body: <p>I have 3 virtual machines. I have Squid proxy installed on one of them which functions as a router. I need to configure it to accept HTTP requests from only one of the other 2 machines(IP - 172.16.2.2). The change I made to the squid.conf file is:</p>
  
  <pre><code>http_port 172.16.2.2:3128
  </code></pre>
  
  <p>I then changed the firewall rule in the route machine so that it redirects traffic from 172.16.2.2 bound for 80 (HTTP port number) to the default squid port 3128. The command is given below:</p>
  
  <pre><code>sudo iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
  </code></pre>
  
  <p>Machine 172.16.2.2 is connected to the router on eth1. However, whenn I am making sending a HTTP request from 172.16.2.2, I get a 403 Forbidden error. It says:</p>
  
  <pre><code>X-Squid-Error: ERR_ACCESS_DENIED 0
  </code></pre>
  
  <p>I can't understand it. Please help. </p>
  
  <p>(edited for style)</p>