Squid:SquidGuard:Configuration

From K12LTSP Wiki

Jump to: navigation, search

Configuring squidGuard is very straight-forward. The default location for the block lists is /var/squidGuard/db/. Each category is located in a different directory. Currently, the categories available are ads, aggresive, audio-video, drugs, gambling, hacking, porn, violence, and warez. The configure file is /etc/squid/squidGuard.conf. Here is a sample configuration file:


dbhome /var/squidGuard/blacklists
logdir /var/log/squidGuard

dest gambling{
    log             gambling
    domainlist      gambling/domains
    urllist         gambling/urls
}

dest warez{
    log             warez
    domainlist      warez/domains
    urllist         warez/urls
}

acl {
    default {
        pass ====gambling !warez all ====
        redirect 302:http://www.google.com
    }
}

dbhome defines where the block list databases are located logdir defines where to log blocked requests dest defines a category acl defines the access controll lists.

This example configuration defines two categories, gambling and warez. The acl line says that the default action is to block (=====don't pass) gambling and warez categories and to permit everything else. The redirect line says to send requests to blocked sites to http://www.google.com, change this to fit your needs.

==

The default configuration file, /etc/squid/squidGuard.conf is much more extensive. See the squidGuard homepage, http://www.squidguard.org/config/ for all of the configuration options available.

Personal tools