Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1173236
  • 博文数量: 128
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 4870
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-19 14:28
文章分类

全部博文(128)

文章存档

2010年(2)

2009年(22)

2008年(104)

我的朋友

分类: LINUX

2008-07-07 10:14:37

Squid ClamAV & HAVP

 
      HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus filter. It does not cache or filter content and in this how-to it is set as a parent proxy of squid, i can be run on it's own.
Name: Squid
HomePage:
Function: proxy caching server for web clients

Name: HAVP (HTTP anti-Virus Proxy)
HomePage:
Function: HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus filter

1. Download clamAV from the website , the fedora binarys can be found at . once they have been downloaded then install all of them.

clamav-0.87.1-2.i386.rpm
clamav-db-0.87.1-2.i386.rpm
clamav-devel-0.87.1-2.i386.rpm
clamav-milter-0.87.1-2.i386.rpm
clamav-server-0.87.1-2.i386.rpm

rpm -ivh clamav-*

2. Add the user havp 'useradd havp' and switch to that user 'su havp' .

3. Now download havp from this website and extract it

gzip -d havp-0.74.tar.gz
tar -xf havp-0.74.tar

4. Then install it using clamav as your virus filter

configure --with-scanner=libclamav
make
make install

5. Once it is installed copy the configuration files into the /etc/ section

cd sourcetohavp/havp/etc
cp -r havp /etc/

6. Now edit the configuation file to your settings

vi /usr/local/etc/havp/havp.config

7. Now we need to mount the directory with mandatory looks

mount /dev/hda9 /var/tmp/havp -o mand

8. Now we need to set all the permissions, so change the root user.

chown -R havp:havp /var/tmp/havp/
chmod ug+rwx -R /var/tmp/havp/
chown -R havp:havp /etc/havp/
chmod ug+rwx -R /etc/havp/
chown -R havp:havp /var/log/havp/
chmod ug+rwx -R /var/log/havp/

9. Once clamav and HAVP have been setup we need to setup squid to run with HAVP. edit the squid.conf file and add the following line

nano /etc/squid/squid.conf

squid.conf:

cache_peer 127.0.0.1 parent 8000 0 no-query no-digest no-netdb-exchange default


10. Now we need to start/restart all the services

/etc/init.d/havp start
/etc/init.d/clamd start
/etc/init.d/squid restart

阅读(1114) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~