Installing Dansguardian

From LinuxMCE
Revision as of 04:05, 31 October 2007 by Rwilson131 (Talk | contribs)

Jump to: navigation, search


DansGuardian is an award winning Open Source web content filter which currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and Solaris. It filters the actual content of pages based on many methods including phrase matching, PICS filtering and URL filtering. It does not purely filter based on a banned list of sites like lesser totally commercial filters.

DansGuardian is designed to be completely flexible and allows you to tailor the filtering to your exact needs. It can be as draconian or as unobstructive as you want. The default settings are geared towards what a primary school might want but DansGuardian puts you in control of what you want to block.

DansGuardian is a true web content filter.

Installing packages


   apt-get install tinyproxy


   apt-get install dansguardian

Configure Packages


  vi  /etc/dansguardian/dansguardian.conf

Make the following changes:

  1. Delete UNCONFIGURED line
  2. filterport = 8081
  3. proxyip =
  4. proxyport = 8888
  5. usernameidmethodproxyauth = off


   vi /etc/tinyproxy/tinyproxy.conf  

Make the following changes

  1. User root
  2. Group root
  3. Allow

Restart Applications

   /etc/init.d/apache2 restart
   /etc/init.d/tinyproxy restart
   /etc/init.d/dansguardian restart

Configuring Firewall to forward to port 8081

You will need to go to LinuxMCE Admin Website Advanced > Network > Firewall Rules and add a new rule. Enter the following into the text boxes.

tcp 80 to 0 8081 port_forward 


Adding BlackList

A BlackList is a precompiled list of sites that are deemed potentially worrisome. This list can be obtained for Here is a step by step guide to adding the biglist to your dansguardian filtering directories

    cd /etc/dansguardian    
    vi OriginalUpdateBL
  • modify line 68 by switching the listed URL with the following:

   chmod 777 /etc/dansguardian/OrginialUpdateBL

when script is finished if you see any errors.

   /etc/init.d/dansguardian restart

Fine Tuning the Filtering

Add Sites which are Exempt

   vi /etc/dansguardian/exceptionsitelist
  • this will speed up these sites

Customize the types of sites you want to block

   vi /etc/dansguardian/bannedsites
  • scroll to the bottom of the page and uncommit out the lines of the types of site you would like to filter out
  • Restart dansguardian
    /etc/init.d/dansguardian restart