On 18/02/2012 8:12 a.m., Carlos Manuel Trepeu Pupo wrote:
Hi !
I want to block:
http://*.google.com.cu
but allow:
http://www.google.com.cu/custom*
I mean deny all the subdomain of google.com.cu except all the URL that
contain the line below
I have Ubuntu with Squid 3.0 STABLE1 with this conf:
acl deny_google dstdom_regex -i google.com
The ACL to use here is dstdomain. As in:
acl deny_google dstdomain .google.com.cu
acl allow_google urlpath_regex -i www.google.com.cu/custom
The ACL to use here is url_regex. As in:
acl allow_google urlpath_regex ^/custom
http_access allow allow_google
http_access deny deny_google
With the above changes to ACLs that should work.
There is one further alteration you can make to improve performance.
"avoid regex whenever possible" by do this:
http_access deny deny_google !allow_google
PS. Your ACL names could do with a bit of improvement to make the access
lines easier to understand.
You may want to allow google access to some users later. At which point
you will find yourself creating:
http_access allow deny_google ...
Amos