Run with Clamav - SquidClamav2013/05/12 |
Install SquidClamav and Configure Proxy Server in order to scan download files to protect from virus.
Install clamav first.
|
|
[1] | Install Clamd |
root@lan:~# aptitude -y install clamav-daemon
|
[2] | Download latest version of Squidclamav from the link below with wget. http://sourceforge.net/projects/squidclamav/files/squidclamav/ |
# install some required packages first
root@lan:~#
root@lan:~# aptitude -y install gcc make curl libcurl4-gnutls-dev c-icap libicapapi-dev wget http://ftp.jaist.ac.jp/pub/sourceforge/s/project/sq/squidclamav/squidclamav/6.10/squidclamav-6.10.tar.gz root@lan:~# tar zxvf squidclamav-6.10.tar.gz root@lan:~# cd squidclamav-6.10 root@lan:~/squidclamav-6.10# ./configure --with-c-icap root@lan:~/squidclamav-6.10# root@lan:~/squidclamav-6.10# make install root@lan:~/squidclamav-6.10#
root@lan:~#
vi /etc/squidclamav.conf # line 17: change ( destination URL for redirect. Create it first ) redirect http://www.srv.world/error.html
|
[3] | Configure c-icap and Squid |
root@lan:~#
vi /etc/default/c-icap # line 6: change START= yes
root@lan:~#
vi /etc/c-icap/c-icap.conf # line 142: change to admin's address ServerAdmin root@srv.world
# line 151: change to your servername ServerName lan.srv.world
# line 499: add Service squidclamav squidclamav.so
root@lan:~#
/etc/init.d/c-icap start Starting c-icap: c-icap.
root@lan:~#
vi /etc/squid3/squid.conf # line 4895: add icap_enable on
# line 4896: add icap_send_client_ip on
# line 4994: add icap_send_client_username on
# line 4999: add icap_client_username_header X-Authenticated-User
# line 5070: add follows
icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
adaptation_access service_req allow all icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav adaptation_access service_resp allow all /etc/init.d/squid3 restart Restarting Squid HTTP Proxy 3.x: squid3 Waiting.....................done. |
[4] | Try to access to a page that has trial virus from here. http://downloadcenter.trendmicro.com/index.php?regs=jp&prodid=1424 Click 'eicar.com' and rty to download it. Then, Virus will be detected and accessing is redirected to the page you set. |
Sponsored Link |
|