| Home | Documentation | Download | Blacklists | Useful stuff |
|---|---|---|---|---|
| Installation | Basic Configuration | Extended Configuration | Known Issues |
| Most simple configuration: one category, one rule for all |
#
# CONFIG FILE FOR SQUIDGUARD
#
dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/logs
dest porn {
domainlist porn/domains
urllist porn/urls
}
acl {
default {
pass !porn all
redirect http://localhost/block.html
}
}
|
| dbhome | Location of the blacklists |
| logdir | Location of the logfiles |
| dest | Definition of a category to block. You can enter the domain and url file along with a regular expression list (talk about regular expressions later on). |
| acl | The actual blocking defintion. In our example only
the default is displayed. You can have more than one acl
in place. The category porn you defined in dest is
blocked by the expression !porn. You have to add the
identifier all after the blocklist or your users will
not be able to surf anyway. The redirect directive is madatory! You must tell SquidGuard which page to display instead of the blocked one. |
| Defining three categories for blocking |
dest adv {
domainlist adv/domains
urllist adv/urls
}
dest porn {
domainlist porn/domains
urllist porn/urls
}
dest warez {
domainlist warez/domains
urllist warez/urls
}
|
acl {
default {
pass !adv !porn !warez all
redirect http://localhost/block.html
}
}
|
| Defining a whitelist |
dest white {
domainlist white/domains
urllist white/urls
}
acl {
default {
pass white !adv !porn !warez all
redirect http://localhost/block.html
}
}
|
| Initializing the blacklists |
squidGuard -C all |
2006-01-29 12:16:14 [31977] squidGuard 1.2.0p2 started (1138533256.959) 2006-01-29 12:16:14 [31977] db update done 2006-01-29 12:16:14 [31977] squidGuard stopped (1138533374.571) |