SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Revision of DansGuardian from Thu, 06/10/2010 - 10:30
Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.
Installation
Install the necessary PCRE libraries:
yum install pcre-develDownload the latest version of DansGuardian:
cd /extra/src
wget http://usmirror.dansguardian.org/downloads/2/Stable/dansguardian-2.10.1.1.tar.gz
tar zxf dansguardian-2.10.1.1.tar.gz
cd dansguardian-2.10.1.1Configure it:
./configure
make
make installChange the ownership on the log file directory:
chown nobody:nobody /usr/local/var/log/dansguardianTo test it out, you can run it directly from the shell:
dansguardianRedirect your web traffic to port 8080 of the Squid/Dansguardian machine and watch /usr/local/var/log/dansguardian/access.log for activity.
Blacklists
cd /usr/local/etc/dansguardian/lists/blacklistsBlacklist files can be downloaded from a variety of sources:
- Malware Patrol
- URLBlacklist.com
- Shalla's Blacklists
cd /extra/src
wget http://www.shallalist.de/Downloads/shallalist.tar.gz
tar zxf shallalist.tar.gz
cd BLCopy which blacklists you want from
/extra/src/BLto/usr/local/etc/dansguardian/lists/blacklists
Edit /usr/local/etc/dansguardian/lists/bannedurllist and /usr/local/etc/dansguardian/lists/bannedsitelist to add the lists you want used. There are examples in those files.
Restart DansGuardian:
dansguardian -gAutomatic startup
We're going to use daemontools. If you haven't already, install daemontools.
Create a directory for the Dansguardian service:
mkdir -m 1755 /var/service/dansguardian
cd /var/service/dansguardianCreate the /var/service/dansguardian/run script, making sure to change the servername:
#!/bin/sh
exec /usr/local/sbin/dansguardian -N 2>&1Make the script executable:
chmod 755 runOur log script comes from John Simpson's:
mkdir -m 755 log
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 runFinally, add the service to daemontools by creating the symbolic link in /service
ln -s /var/service/dansguardian /service/dansguardianConfirm that the service is running:
svstat /service/dansguardian /service/dansguardian/log- Log in to post comments