Malware Block List - How-To use the Malware Block List on Squid Proxies
How-To use the Malware Block List on Squid Proxies
To use the Malware Block List on a Squid proxy to block user access to URLs that contain Malware you need to perform the following simple steps:
Create an ACL in the main configuration file (squid.conf) pointing to a file which will have the list of URLs:
acl malware_block_list url_regex -i "/etc/squid/malware_block_list.txt"
Enable the ACL created previously:
http_access deny malware_block_list
deny_info http://malware.hiperlinks.com.br/denied.shtml malware_block_list
Download the block list:
wget -O - http://malware.hiperlinks.com.br/cgi/submit?action=list_squid > malware_block_list.txt
Force Squid reconfiguration:
squid -k reconfigure
To have an up-to-date block list, create a cron job to run every 4 hours, pointing to a script like this:
#!/bin/shwget -O - http://malware.hiperlinks.com.br/cgi/submit?action=list_squid > /etc/squid/malware_block_list.txt
squid -k reconfigure