This page is about setting a rudimental web filtering system with squidGuard and blacklists

Rudimentary squidGuard Filtering

We recently had a complaint in our in our school about not-existing internet filters. So I setup squidGuard. It took me about 2 hours from learning that squidGuard exists, to having it working in a very basic way. For more advanced things see the bottom of the page.

"Note: The listings within this wiki have been worked out using a Sarge Tjener."

Installation

Become root, then:

apt-get install squidguard

Setup

download a basic blacklist from:

http://squidguard.mesd.k12.or.us/blacklists.tgz

copy that blacklist to the squid directory with:

cp blacklist.tgz /var/lib/squidguard/db/

change directory to the squidGuard database directory:

cd /var/lib/squidguard/db

untar the blacklists with:

tar xvzf blacklists.tgz

Write your config file at:

/etc/squid/squidGuard.conf

a sample squid.conf for the blacklist above can be found in SquidGuardConf

If you look into the directories holding the files domains and urls you see that additional files have been created: domains.db and urls.db.

If you have no sudo you need to change owner again.

Tell squid to use squidGuard (arm squid), so add the following line:

url_rewrite_program /usr/bin/squidGuard

to the squid config file at

/etc/squid/squid.conf

Create message that is returned for blocked URLs

/var/www/block.html

I used BlockHtml, which is a nice red&black page with a link to skolelinux.de.

Restart squid:

squid -k reconfigure

Verifying the installation

Well the easiest way is to visit some nasty site and check to see if it is blocked, also check some good sites to see if they are let through. The squidGuard website also has a nice way of checking if it works at : verifying squidGuard

Webmin Module - I tried to install this and make it work at DebianEdu/HowTo/SquidGuard/webmin, however the module din't really work too well, and so this idea has been abandoned as webmin and sarge are bothe deprecated