How-To use the Malware Block List on SquidGuard
Thanks to Awie for helping with SquidGuard
To use the Malware Block List on SquidGuard to block user access to URLs that contain Malware you need to perform the following steps:
- Download the block list
wget -O - http://malware.hiperlinks.com.br/cgi/submit?action=list_sguard > /usr/local/squidGuard/db/malware/urls
- Reconfigure squidguard.conf to use the URLs database. Use something like this:
#
# CONFIG FILE FOR SQUIDGUARD
#
dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/log
dest porn {
domainlist porn/domains
urllist porn/urls
expressionlist porn/expressions
}
dest malware {
urllist malware/urls
}
acl {
default {
pass !porn !malware all
redirect http://www.malware.com.br/denied.shtml
}
}
- Force SquidGuard to re-read its config files:
squid -k reconfigure
To have an up-to-date block list, create a cron job to run every 1 hour, pointing to a script like this:
#!/bin/sh
wget -O - http://malware.hiperlinks.com.br/cgi/submit?action=list_sguard > /usr/local/squidGuard/db/malware/urls
squid -k reconfigure