title: Squid Rotating Exit IPs with cache_peer
body: <p>I am trying to duplicate the configuration described in this blog post.</p>
  
  <p><a href="http://www.everydayinternetstuff.com/2011/03/squid-random-outgoing-ipinterface-selection/" rel="nofollow">http://www.everydayinternetstuff.com/2011/03/squid-random-outgoing-ipinterface-selection/</a></p>
  
  <p>This technique as I understand it is supposed to trick squid into thinking it's both a parent and a cache_peer thus allowing you to roll exit IPs from a single instance.</p>
  
  <p>Using this configuration I have been able to exit the IPs that I enter on, but I am unable to rotate exit IPs when entering .</p>
  
  <p>The error page being reported is an Access Denied error page from squid cache.</p>
  
  <p>I'd appreciate any assistance or suggestions. Also if anyone has a working configuration done a different way, I'd appreciate hearing those suggestions as well.</p>
  
  <pre><code>http_port &lt;entry ip&gt;:3128
  http_port &lt;exit1&gt;:3128
  http_port &lt;exit2&gt;:3128
  http_port &lt;exit3&gt;:3128
  
  
  auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_passwd
  auth_param basic children 5
  auth_param basic realm ProxyBox
  auth_param basic credentialsttl 2 hours
  acl ncsaauth proxy_auth REQUIRED
  http_access allow ncsaauth
  
  acl src_01 src &lt;exit1&gt;
  acl src_02 src &lt;exit2&gt;
  acl src_03 src &lt;exit3&gt;
  
  tcp_outgoing_address &lt;exit1&gt; src_01
  tcp_outgoing_address &lt;exit2&gt; src_02
  tcp_outgoing_address &lt;exit3&gt; src_03
  
  acl first_req src 127.0.0.0/8
  acl second_req src &lt;exitnet&gt;/29
  
  cache_peer &lt;exit1&gt; parent 3128 0 round-robin no-query login=proxyadmin:password
  cache_peer &lt;exit2&gt; parent 3128 0 round-robin no-query login=proxyadmin:password
  cache_peer &lt;exit3&gt; parent 3128 0 round-robin no-query login=proxyadmin:password
  
  cache_peer_access &lt;exit1&gt; allow first_req
  cache_peer_access &lt;exit2&gt; allow first_req
  cache_peer_access &lt;exit3&gt; allow first_req
  
  cache_peer_access &lt;exit1&gt; deny second_req
  cache_peer_access &lt;exit2&gt; deny second_req
  cache_peer_access &lt;exit3&gt; deny second_req
  
  never_direct allow first_req
  never_direct deny second_req
  </code></pre>