Squid ACL notes

From Notes_Wiki
Revision as of 00:57, 24 November 2012 by Saurabh (talk | contribs)

Squid ACL notes

Blocking domains

We can use following lines to block domains youtube.com, youtube.co.uk, etc. from 10.2.48.0/24 IP range:

acl youtube_facebook_source src 10.2.48.0/24
acl youtube_facebook_destination dstdomain .youtube.com .facebook.com .youtube.co.uk .youtube.co.in .googlevideo.com .metacafe.com
http_access deny youtube_facebook_source youtube_facebook_destination

Note:

  • Dot (.) before .youtube.com in dstdomain ACLs is very important if we want to block www.youtube.com, etc. subdomains. If we just use youtube.com without dot(.) then ACL do not work as intended.


You can also read Configuring proxy authentication for squid to read information on proxy authentication related ACLs.

Back to Squid proxy server configuration