Hi Surjo
I have configured squidguard for blocking porn sites etc and it
works fantastic here is the procedure to do so
Install Berkeley DB library
# mkdir /usr/local/BerkeleyDB/src
# cp db-2.7.7.tar.gz /urs/local/BerkeleyDB/src
# cd /urs/local/BerkeleyDB/src
# tar -xvzf db-2.7.7.tar.gz
# cd db-2.7.7/dist/
# ./configure \
--prefix=/usr/local
# make
# make install
# make clean
Install Squid Guard
# mkdir /usr/local/squidGuard/src
# cp squidGuard-1.1.4.tar.gz /usr/local/squidGuard/src
# cd /usr/local/squidGuard/src
# tar -xvzf squidGuard-1.1.4.tar.gz
# cd squidGuard-1.1.4
# ./configure \
--prefix=/usr/local/squidGuard \
--with-sg-config=/usr/local/squidGuard/conf \
--with-sg-logdir=/usr/local/squidGuard/logs \
--with-sg-dbhome=/usr/local/squidGuard/db
# make
# make test
# make install
# mkdir /usr/local/squidGuard/conf
# mkdir /usr/local/squidGuard/db
Configuring ( all configuration settings are in one file squidGuard.conf
found in /usr/local/squidGuard/conf/)
Contents of squidGuard.conf file (basic config dosent allow to block
any site)
logdir /usr/local/squidGuard/logs
acl {
default {
pass all
}
}
Installing squidGuard blacklists
# cp blacklists.tar.gz /usr/local/squidGuard/db
# mkdir /usr/local/squidGuard/db/blacklists
# tar -xvzf blacklists.tar.gz
# cd /usr/local/squidGuard/db/blacklists ( we have many subdir in this
directory for eg Porn, hacking, drugs etc)
# chmod 644 -R /usr/local/squidGuard/db/blacklists/*
Configuration of SquidGuards Blacklists
# vi /usr/local/squidGuard/conf/squidGuard.conf
and change the default file to something like this
logdir /usr/local/squidGuard/logs
dbhome /usr/local/squidGuard/db
dest porn {
domainlist blacklists/porn/domains
urllists blacklists/porn/urls
expressionlist blacklists/porn/expressions
}
acl {
default {
pass !porn all
redirect
http://www.syz.com/cgi-bin/squidGuard.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&url=%u
}
}
save and quit the file
Integrating squidguard with squid
# vi /usr/local/squid/etc/squid.conf
and change
redirect_program /usr/local/squidGuard/bin/SquidGuard -c
/usr/local/squidGuard/conf/squidGuard.conf
# restart squid
Test with your browser and try to enter sites that are blocked
Alternativly you may need to create another controlfile so that sites
which are not bloced can be blocked with force.
#mkdir /usr/local/squidGuard/db/blacklists/mylists
#touch /usr/local/squidGuard/db/blacklists/mylists/domains
#vi /usr/local/squidGuard/db/blacklists/mylists/domains
put necessary domainnames in this file to block
# vi usr/local/squidGuard/conf/squidGuard.conf
and add the following so that it contains
logdir /usr/local/squidGuard/logs
dbhome /usr/local/squidGuard/db
dest porn {
domainlist blacklists/porn/domains
urllist blacklists/porn/urls
expressionlist blacklists/porn/expressions
}
dest mylist {
domainlist blacklists/mylist/domains
}
acl {
default {
pass !porn !mylist all
redirect
http://www.syz.com/cgi-bin/squidGuard.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&url=%u
}
}
write and save the file
Now u need to change the permisions on your blacklists directory
#chmod -R 755 /usr/local/squidGuard/db/blacklists
To check please restart squid
To install Access denied page which is referenced by the redirect http
line in squidGuard.conf file
#cp /squidguardsrcfiles/samples/squidGuard.cgi
/usr/local/apache/cgi-bin/
# chmod +x /usr/local/apache/cgi-bin/squidGuard.cgi
# vi /usr/local/apache/cgi-bin/squidGuard.cgi
and do necessary changes
Enjoy Rgds
Arvind Clemente
SURJO DAS wrote:
> Hi List,
>
> Has anyone configured SquidGuard to block access to
> porn sites through squid ? If so, could you kindly
> mail me the exact procedure for installation,
> configuration and testing ? I would be highly
> obliged. I tried the same procedure from
> www.squidguard.org website. But it doesn't seem to
> work. Any help would be appreciated.
>
> TIA,
>
> Surjo.
>
> =====
> The 3 biggest disasters in History
>
> Hiroshima 45
> Chernobyl 86
> Windows 95
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
> _______________________________________________
> linux-india-help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/linux-india-help
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help