Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict Squid access to only one site

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
like image 913
Fenelon Avatar asked May 15 '12 10:05

Fenelon


2 Answers

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
like image 102
dwalter Avatar answered Oct 27 '22 00:10

dwalter


Here is another way, where you can specify the source IP addres. And block specific sites such as youtube facebook

acl liberaip src 130.44.0.215
acl block url_regex -i youtube facebook
http_access allow liberaip !block
like image 23
Cleber Reizen Avatar answered Oct 27 '22 00:10

Cleber Reizen