Controlling communication with peers

Unil now we have learned about various options that can be used to configure cache peers or neighbors as parents or siblings. Now, we'll learn about controlling access to different peers and sending a variety of requests to different peers, depending on various rules. Access control over peer communication is achieved via various directives in the Squid configuration file. We have learned about these directives briefly, but we'll explore them in detail now.

Domain-based forwarding

Squid provides a directive cache_peer_domain, using which we can restrict the domains for which a particular peer or neighbor will be referred. The general format for the cache_peer_domain directive is:

cache_peer_domain NAME [!]domain ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.