Tuesday, June 25, 2013

CentOS 5.9 - Squid proxy & SquidGuard Configuration

Squid Cache: Version 2.6.STABLE21
SquidGuard-1.4-8.el5.rpm
--------------------------------------------------------------------------------------------------------
vi   /etc/squid/squid.conf

redirect_program     /usr/bin/squidGuard   -c  /etc/squid/squidGuard.conf
redirect_children    1
--------------------------------------------------------------------------------------------------------
yum  -y  install  squidGuard

vi    /etc/squid/squidGuard.conf
delete everything from "squidGuard.conf" file and add the followings
---------------------------------------------------------------------------------------------------------
#
# CONFIG FILE FOR SQUIDGUARD
#

dbhome /var/lib/squidguard/db/blacklists
logdir /var/log/squidGuard

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

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

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

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

dest lingerie {
        domainlist      lingerie/domains
                }

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

dest white      {

        domainlist      white/domains
        urllist         white/urls
        }

acl {

        default {
                    pass white !adult !hacking !malware !warez !lingerie !social_networks  all
                redirect http://www.google.com
        }
}
---------------------------------------------------------------------------------------------------------------
mkdir   /var/lib/squidguard
mkdir   /var/lib/squidguard/db
cd  /var/lib/squidguard/db/


wget  http://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz
tar  -xvzf  blacklists.tar.gz
cd   /var/lib/squidguard/

chown -R  squid:squid  .

chown  -R   squid:squid   /var/log/squidGuard/.
squidGuard   -C  all
tail   -f   /var/log/squidGuard/squidGuard.log

squid   -k    reconfigure


1 comment:

Squidblacklist said...

Squidblacklist.org is the worlds leading publisher of native acl blacklists tailored specifically for Squid proxy, and alternative formats for all major third party plugins as well as many other filtering platforms.

There is room for better blacklists, we intend to fill that gap.


It would be our pleasure to serve you.

Signed,

Benjamin E. Nichols
http://www.squidblacklist.org