Expressions - Phrases

Discuss and get help to configure the URL filtering
Post Reply
One2One
Posts: 1
Joined: 22 Jul 2016 14:31

Expressions - Phrases

Post by One2One »

Good day
I am setting up CG for a school, and have been able to load the standard url blacklists and domain lists into CG.

Expression lists however do not work, and they are extremely important for blocking google searches of adult content.
I have attempted the following:
  • Using standard squidguard recommended lists
    Formatting a list of words intended to be block in various ways
    simply entering a single word
    formatting a single word with prefixes and in brackets etc.
Can anyone please provide a working list of words, or advise me as to how the list needs to be formatted before importing.
Any kind of help or guidance would be very appreciated.
User avatar
david
Posts: 163
Joined: 08 Aug 2015 20:38

Re: Expressions - Phrases

Post by david »

Hi

Expression lists are based on regular expressions. You can read more about regular expressions at: http://www.cacheguard.net/doc/command/urllist.html (section REGULAR EXPRESSIONS).

We don't provide expression lists but for example the following regular expression given in the SquidgGuard documentation can block porn sites searched with Google:

(^|[-\?+=/_])(bondage|boobs?|busty?|hardcore|porno?|sex|xxx+)([-\?+=/_]|$)

To use this expression with CacheGuard please do the following:

- Put it in a file called Porn.expressions
- Compress the file with gzip (to obtain the file Porn.expressions.gz)
- Copy the file Porn.expressions.gz on a trusted file server (read more at about trusted file servers at http://www.cacheguard.net/doc/command/access.html)
- Then use following commands to integrate it into your CG (replace the file transfer protocol and IP address by yours):

Code: Select all

urllist add Porn
urllist load create Porn tftp 10.0.10.1 Porn expressions
guard rule add default deny Porn
mode guard on
apply
Best Regards,
David Janeway
CacheGuard Technical Team
https://www.cacheguard.com
Post Reply