SquidGuard and new black lists

SquidGuard about whose installation I have written in previous posts is quite old, but its lifespan has been extended, thanks to new BlackLists which can be found here : link.
Since I have already SquidGuard with old lists, this is a How-To put up new BLs.

1. Download new extended lists
# wget http://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz
2. Untar them in some local folder on server
# tar xvfz blacklists.tar.gz
You get a blacklists folder, under which there are a bunch of other folders, according to categories.
3. Copy new BLs to appropriate location : /usr/local/squidGuard/db/blacklists (in my opinion old lists can be overwritten with new ones, with no loss in detection capability). Take care of ownership and folder rights. They should be :
drwxrwx— 2 squid squid 4096 Aug 26 15:08 ads
drwxrwx— 2 squid squid 4096 Aug 26 15:08 aggressive
…..
# chown -R squid.squid /usr/local/squidGuard/db/blacklists/
# chmod -R 770 /usr/local/squidGuard/db/*
4. Set up new lists so that SG can use them :
# pwd
/usr/local/squidGuard/db
# squidGuard -u -C all
In another Putty window, watch SG logs, to see that all goes well :
# tail -f /usr/local/squidGuard/log/squidGuard.log
5. Restart Squid
# service squid reload this is enough, so it gets the new configuration
6. Test it
# echo “http://www.pussy.com 10.10.10.143/ – – GET” | squidGuard -c /usr/local/squidGuard/squidGuard.conf -d
2013-08-28 08:57:27 [6710] New setting: dbhome: /usr/local/squidGuard/db
2013-08-28 08:57:27 [6710] New setting: logdir: /usr/local/squidGuard/log
2013-08-28 08:57:27 [6710] Added User: root
2013-08-28 08:57:27 [6710] destblock good missing active content, set inactive
2013-08-28 08:57:27 [6710] destblock local missing active content, set inactive
2013-08-28 08:57:27 [6710] init domainlist /usr/local/squidGuard/db/blacklists/porn/domains
2013-08-28 08:57:27 [6710] loading dbfile /usr/local/squidGuard/db/blacklists/porn/domains.db
2013-08-28 08:57:27 [6710] init urllist /usr/local/squidGuard/db/blacklists/porn/urls
2013-08-28 08:57:27 [6710] loading dbfile /usr/local/squidGuard/db/blacklists/porn/urls.db
2013-08-28 08:57:27 [6710] init expressionlist /usr/local/squidGuard/db/blacklists/porn/expressions
2013-08-28 08:57:27 [6710] init domainlist /usr/local/squidGuard/db/blacklists/adult/domains
2013-08-28 08:57:27 [6710] loading dbfile /usr/local/squidGuard/db/blacklists/adult/domains.db
2013-08-28 08:57:27 [6710] init urllist /usr/local/squidGuard/db/blacklists/adult/urls
2013-08-28 08:57:27 [6710] loading dbfile /usr/local/squidGuard/db/blacklists/adult/urls.db
2013-08-28 08:57:27 [6710] init expressionlist /usr/local/squidGuard/db/blacklists/adult/expressions
2013-08-28 08:57:27 [6710] squidGuard 1.4 started (1377673047.850)
2013-08-28 08:57:27 [6710] Info: recalculating alarm in 27153 seconds
2013-08-28 08:57:27 [6710] squidGuard ready for requests (1377673047.854)
2013-08-28 08:57:27 [6710] source not found
2013-08-28 08:57:27 [6710] no ACL matching source, using default
2013-08-28 08:57:27 [6710] Request(default/porn/-) http://www.pussy.com 10.32.34.140/- – – REDIRECT
http://10.10.10.94 10.10.10.143/- – –
2013-08-28 08:57:27 [6710] squidGuard stopped (1377673047.854)

This entry was posted in Linux and tagged , . Bookmark the permalink.

Comments are closed.