Roger Thomas wrote:
Hi,
This is my first time posting to the mailing list, but I just wanted to know
whether anyone knew how to do the below:
I use the following to block a list of words from URL’s:
acl misc_block_list url_regex -i "/etc/squid/block/misc_block.list"
http_access deny misc_block_list
I am trying to allow certain words, so for example, the word sex is in the
block list, but I want the word sussex to be allowed.
I have created another file called misc_allow.list but I’m not sure how to
tell it to allow. I presumed something like this:
acl misc_allow_list url_regex -i "/etc/squid/block/misc_allow.list"
http_access allow misc_allow_list
This ACL allows ANYONE to use your proxy to get to URLs that match your
misc_allow_list (unless they are blocked earlier).
Better would be combining the two acls in one http_access line...
http_access deny misc_block_list !misc_allow_list
... which reads block any request where the URL matches a regular
expression found in /etc/squid/block/misc_block.list UNLESS it also
matches a regular expression in /etc/squid/block/misc_allow.list. Just
be mindful of how regex matching effects your proxy performance.
this doesn’t work though. It says:
If anyone can help, I would really appreciate it!
Thank you all in advance,
Regards,
Roger
Roger.e.thomas@xxxxxxxxx
Chris