Sie sind auf Seite 1von 3

How to setup squidGuard under Debian http://techgurulive.com/2009/04/29/how-to-setup-sq...

debian lenny squidguard


You came here from www.google.com searching for debian lenny squidguard.
These posts might be of interest:

How to Block against dns based blacklists in SquidGuard


How to Verifiy your squidGuard Configuration
How to Install squidGuard
How to Install Apache2 And mod_defensible
Fedora 9: How to Install SquidGuard Proxy Filter

Content filtering for the Web can be a messy proposition. A business may need to block only the most objectionable
Web sites, while schools may be required by law to follow a more thorough process. Whatever your needs, you can
build a solution with only open source pieces: squid, squidGuard, and blacklists.

Installation

become root, then:

apt-get install squidguard

Setup

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/

stay root, then:

change directory to the squidGuard database directory

cd /var/lib/squidguard/db

untar the blacklists with:

tar xvzf blacklists.tgz

Now you may write your config file at:

2 of 8 05/19/2010 04:07 PM
How to setup squidGuard under Debian http://techgurulive.com/2009/04/29/how-to-setup-sq...

/etc/squid/squidGuard.conf

a sample 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 (all files 644, all directories 755):

find /var/lib/squidguard/db -type f | xargs chmod 644
find /var/lib/squidguard/db -type d | xargs chmod 755

Next you need to initialize the database, do:

sudo -u proxy squidGuard -C all

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.

Now you will need to tell squid to use squidGuard (arm squid), 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 approx. line 1023

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.

3 of 8 05/19/2010 04:07 PM
How to setup squidGuard under Debian http://techgurulive.com/2009/04/29/how-to-setup-sq...

Then restart squid with:

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

For debian-edu you can use the following command:

echo "http://www.rotten.com / - - GET" | squidGuard -d

if you change the blacklists

You will need to update the Squid Guard database with:

sudo -u proxy squidGuard -C all

And then reconfigure squid with:

squid -k reconfigure

Links

squidGuard
squidGuard Docs

Tags:blacklist, content filtering, Debian, squid, squidGuard

Liked this article? To continue getting our latest free Howtos and Tutorials,
you can also grab the RSS feed or Subscribe to Techgurulive by Email

Not Getting

Search

Related posts
How to setup TCP Wrappers (TCPD) Under FreeBSD
Eeebuntu Switching To Debian, No Longer Just for EeePC

4 of 8 05/19/2010 04:07 PM

Das könnte Ihnen auch gefallen