Differences between revisions 2 and 3
Revision 2 as of 2007-05-07 17:13:27
Size: 2510
Editor: ?ValentinHaenel
Comment:
Revision 3 as of 2007-05-08 10:17:11
Size: 2731
Editor: ?ValentinHaenel
Comment:
Deletions are marked like this. Additions are marked like this.
Line 73: Line 73:
Now you need to give the squidGuard database the appropriate ownership:

{{{
chown proxy:proxy -R /var/lib/squidguard/db/*
}}}

and permissions:

{{{
chmod 644 -R /var/lib/squidguard/db/*
}}}

Line 76: Line 89:
squidGuard -C all sudo -u proxy squidGuard -C all

This article is incomplete please do not edit yet, unless you know what you are doing.thanks

TODO

  • add a link to the squidGuard webpage, possibly other how-tos
  • explain some more things
  • add a last line requesting feedback
  • translate into german, and add to my german wiki

TODO Advanced:

  • More about blacklists, languages
  • Logging blacklist violations, and messaging someone
    • ?ValentinHaenel

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.

Installation

become root, then:

apt-get install squidGuard

Download a basic blacklist from:

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

next copy that blacklist to the squid directory with:

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

Setup

stay root, then:

change directory to the squidGuard database directory

cd /var/lib/squidGuard/db

untar the blacklists with:

tar xvzf blacklists.tgz

move the black lists into the database directory:

mv blacklist/* .

TODO: show what the directory schould look like.

Now you may write your config file at:

/etc/squid/squidGuard.conf

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

Now you need to give the squidGuard database the appropriate ownership:

chown proxy:proxy -R /var/lib/squidguard/db/*

and permissions:

chmod 644 -R /var/lib/squidguard/db/*

Next you need to initialse the database, do:

sudo -u proxy squidGuard -C all

TODO: explain what this does to the directory

Now you will need to tell squid to use squidGuard, so add the following line

redirect_program /usr/bin/squidGuard

to the squid config file at

/etc/squid/squid.conf

Preferably where it says

#  TAG: redirect_program

at apprx line 1023, and the restart squid with:

squid -k reconfigure

now lastly make the 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.

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.

TODO: explain another way to check that it works, i.e. see squid website.

I hope that with the above instructions, you will be able to setup squidGuard and even use a blacklist of your own.