1. Install Clam AntiVirus to protect server from virus.
#apt-get -y install clamav
#freshclam // update pattern files
2.
Try to scan
# clamscan --infected --remove --recursive /home
3.
Install Clamd
4. Download the latest version of Squidclamav from the link below.
http://sourceforge.net/projects/squidclamav/files/squidclamav/
http://sourceforge.net/projects/squidclamav/files/squidclamav/
5. install some required packages first
#apt-get -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/7.1/squidclamav-7.1.tar.gz #tar zxvf squidclamav-7.1.tar.gz
#cd squidclamav-7.1
#./configure --with-c-icap
#make
#make install
#cd
#ln -s /etc/c-icap/squidclamav.conf /etc/squidclamav.conf
#vi /etc/squidclamav.conf
// line 17: change ( create a error page that is redirected to )
redirect
http://192.168.50.254/error.html
6.
Configure c-icap and Squid
#vi /etc/default/c-icap
// line 6: change
START=yes
#vi /etc/c-icap/c-icap.conf
// line 142: change to the admin email
ServerAdmin admin@singnarin.net
// line 151: change to the hostname
ServerNameprox.singnarin.net
// line 502: add
Service squidclamav squidclamav.so
#/etc/init.d/c-icap start
#vi /etc/squid3/squid.conf
//add
icap_enable on
icap_send_client_ip on
icap_send_client_username on
icap_client_username_encode off
icap_client_username_header X-Authenticated-User
icap_preview_enable on
icap_preview_size 1024
icap_service service_req reqmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav
icap_service service_resp respmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav
adaptation_access service_req allow all
adaptation_access service_resp allow all
icap_send_client_ip on
icap_send_client_username on
icap_client_username_encode off
icap_client_username_header X-Authenticated-User
icap_preview_enable on
icap_preview_size 1024
icap_service service_req reqmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav
icap_service service_resp respmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav
adaptation_access service_req allow all
adaptation_access service_resp allow all
#service squid3 restart
ไม่มีความคิดเห็น:
แสดงความคิดเห็น