Search squid archive

Re: Bypassing Squid completely for specific domains/IPs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Raath wrote:
Hi,

There's an old discussion in these archives about how squid does a DNS
lookup on the requested hostname and directs the request to the IP
returned from DNS, effectively bypassing the destination IP supplied
by the squid client, and I fully understand and take on board the
reasons given for this, viz to prevent cache poisioning by spoofing
domains.

However, there is a very valid reason for not wanting this behaviour
in some instances, and that's to test releases of web applications in
a development environment by spoofing the production environment with
hosts file entries, and in this case you wouldn't want to be viewing
cached content anyway, so my question is this - is there a way of
telling squid to just pass the request on wholesale to the requested
IP without doing any DNS, and without caching?

I don't think that always_direct does what I want, as squid still does
the DNS lookup here. I can't believe that I'm the only one with this
requirement, so how have others solved it?


Since you want to affect caching as well as routing. You will need to setup ACL in side squid anyway to match the appropriate 'dstdomain'. With the test web application configured as a cache_peer:

 cache_peer_access allow <ACL>
 cache_peer_access deny all
 cache deny <ACL>
 http_access allow <ACL>

Will route just that domain at the test app without using any form of DNS (dues to dstdomain not needing it), and prevent caching of that traffic all at once.


Amos
--
Please use Squid 2.7.STABLE4 or 3.0.STABLE8

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux