Restrict Squid access to only one site

Fenelon picture Fenelon · May 15, 2012 · Viewed 31.4k times · Source

How do I restrict access to only one website through my Squid proxy?

The following doesn't work...

acl amazon_ireland src 79.125.0.0/17
acl some_site url_regex google

http_access allow amazon_ireland
http_access allow some_site
http_access deny all

Answer

dwalter picture dwalter · May 15, 2012

Have a look at the squid FAQ, there is a perfect example for your setup.

Squid FAQ

 acl GOOD dst 10.0.0.1
 http_access allow GOOD
 http_access deny all

if you want to match by domain-name

 acl GOOD dstdomain .amazon.ie
 http_access allow GOOD
 http_access deny all