DansGuardian Documentation Wiki

You are here: Main Index » configuration_examples


|

Wiki Information

Special Configuration Examples

Here are some special configurations that have come up in the mailing list. They are preserved here so that hopefully people can make use of them.

Grant users access only to sites you explicity allow

If you want to have users whitelisted for a few sites, but then block them from everything else you should use the Blanket Block feature. (Whitelisting is often understood to be what “reverse polarity” means, although there are other interpretations of that phrase too.)

Example:

Allow user1 to access yahoo.com and msn.com but deny access to any other website.

In the /etc/dansguardian/bannedsitelist file for the group you are administering, set the Blanket Block setting as you see below.

#Blanket Block.  To block all sites except those in the
#exceptionsitelist file remove the # from the next line to leave
#only a '**':
**

Now add to the exceptionsitelist the websites that you want people to have access to. All sites not listed in the exceptionsitelist will be blocked.

(For the example above, /etc/dansguardian/exceptionsitelist file for the group you are administering should be:

yahoo.com
msn.com

Blocking RSS Feeds

FIXME Anyone willing/able to help fix the regex so that it blocks ALL RSS?

Add the following lines to your contentregexp file and it will substitute the actual RSS content with a “block message”. There are three lines to cope with the different RSS methods I'm aware of.

Make sure that each section in quotation marks below is put on a single line in your configuration files.

"<rss version.*</rss>"->"<rss version="2.0"><item><title>RSS Blocked by DansGuardian</title><link>http://dansguardian.org/</link><description>RSS Blocked by DansGuardian</description></item></rss>"


"<feed.*feed>"->"<feed version="0.1"><title>RSS Blocked by DansGuardian</title><entry><title>RSS Blocked by DansGuardian</title><link>http://dansguardian.org/</link></entry></feed>"

"<rdf.*rdf>"->"<rdf:RDF><channel rdf:about="http://dansguardian.org"><title>RSS Blocked by DansGuardian</title><link>http://dansguardian.org</link><description>RSS Blocked by DansGuardian</description><items><rdf:Seq><rdf:li resource="http://dansguardian.org/2002/09/01/"/><rdf:li resource="http://dansguardian.org/2002/09/02/"/></rdf:Seq></items></channel><item rdf:about="http://dansguardian.org/2002/09/01/"><title>RSS Blocked by DansGuardian</title><link>http://dansguardian.org/2002/09/01/</link><description>RSS Blocked by DansGuardian</description><dc:date>2002-09-01</dc:date></item></rdf:RDF>"

It worked for the RSS feeds on the dansguardian.org site and the smoothwall.net site. It DID NOT block RSS on bbc.co.uk or others I tested. I suspect that the regex matching on ”<rss.*rss>” is not good enough. I'm not regex expert - I just tried a few things and copied and pasted until I got something that sort-of worked.