Modifying SquidGuard to Support Whitelisting of Certain Sites

I realized after a lot of trial and (mostly) error that trying to create a whitelist in Squid was completely useless because I've configured Squid to use SquidGuard as a helper app and it's *that* applications URL and domain databases that have to be configured for whitelisting of certain URLs.

Essentially you have to create a whitelist SquidGuard db directory which contains two files, one which contains the domains that you wish to whitelist and the other which contains the URLs you wish to whitelist. These two files are consulted by SquidGuard's own configuration file when compiling into memory sites which should be blocked and sites that should be allowed. Here's the URL for the how-to on SquidGuard's own site: http://www.squidguard.org/Doc/configure.html

Here's the code which has to included in the /etc/squid/squidGuard.conf file:

dest white {
domainlist white/domains
urllist white/urls
}

acl {
default {
pass white !adv !porn !warez all
redirect http://localhost/block.html
}
}

Oh,and I modified the

Oh,and I modified the SquidGuard automated update script to recreate the aforementioned subdirectories and files since they will otherwise be blown away when the new URL and blacklist files are downloaded and recompiled. (Shallalist .. Use this keyword to search on this site)

/Eric
____________________________________________
webmaster, enthusiast and site administrator
Ottawa, Canada