Online Learning Academy -

... Sharing Knowledge

  • Increase font size
  • Default font size
  • Decrease font size

Howto install SquidGuard?

E-mail Print PDF

I assume you have installed Squid and is running smothly.

Yum install squidguard

cd /var/lib/squidguard/


tar –xvzf shallalist.tar.gz

vi /etc/squid/squidguard.conf

and change it as under

dbhome /var/lib/squidguard/BL/

In this you have to define ACL for all categories up to you choice I shall only define
to ACL rest of the procedure is same and also logic

dest movies{                                  ####This you ACL Name
        domainlist      /var/lib/squidguard/BL/movies/domains          ### this is complete path to this category domains
        urllist         /var/lib/squidguard/BL/movies/urls
        log             /var/log/squidguard/movies.log                                                ### this path is for log

Now you have define ACL next and last step is to allow or deny this
can be done in Default ACL section

acl {

default {
pass !movies !next ACL !in-addr all
redirect http://your custom Address


Similarly you can define much categories at they shows in /var/lib/squidguard/BL/ Folder

Now enter the following command so that squid can create database from text files

Squidguard –C all

Note: At the end of squidguard.conf there is default ACL it must be there other wise your squidguard may fail

For logging you get log of all categories in one log file and also can get individually per category by defining separate name in particular access list.

Just Set the permission on BL folder so that squid user can access the contents

Chmod 750 -R /var/lib/squidguard/BL/
Chown squid. -R /var/liv/squidguard/BL/

Now process of attaching blacklist is completed. Now we start last step that is attaching squid to squidguard

vi /etc/squid/squid.conf

Enter the following lines just above that acl where you have allowed your network e.g: http_access allow my_network

redirect_program /usr/bin/squidGuard -c /etc/squid/squidguard.conf

You may want to create whitelist so that blocked site can be allowed Enter the following lines also create the same file if your white list is empty then squid may warn you about it

acl white dstdomain "/etc/squid/whitelist"
redirector_access deny white

I hope this would be informative for you and thanks for visiting

dest movies{
        domainlist      /var/lib/squidguard/BL/movies/domains
        urllist         /var/lib/squidguard/BL/movies/urls
#       expressionlist  /var/lib/squidguard/BL/movies/expressions
#       log             /var/log/squidguard/blocked.log
#       redirect
        log             /var/log/squidguard/movies.log
Last Updated on Friday, 28 January 2011 13:14  
Follow us on Twitter

Main Menu




Interview Questions






Graduate Courses


Feed Burner

Subscribe to Welcome to Online Learning Academy by Email

Enter your email address:

Delivered by FeedBurner

Google Groups
Subscribe to LearnAcad
Visit this group

Login Form