免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1433 | 回复: 0

samba防毒 [复制链接]

论坛徽章:
0
发表于 2010-01-28 01:40 |显示全部楼层
   首先要找到你現在使用的samba版本,並下載其原始碼
# rpm -q samba
samba-3.0.32-0.fc8
至 Samba 官方網站下載對應的 Source 位置http://us1.samba.org/samba/ftp/old-versions/
#wget
http://us5.samba.org/samba/ftp/old-versions/samba-3.0.32.tar.gz
再下載samba-vscan模組
#wget
http://www.openantivirus.org/download/samba-vscan-0.3.6c-beta5.tar.gz
開始安裝
#cd /usr/local/src
#tar xvf /root/samba-3.0.32.tar.gz
#cd samba-3.0.32/examples/VFS/
#tar xvf /root/samba-vscan-0.3.6c-beta5.tar.gz
#cd /usr/local/src/samba-3.0.32/source/
#./configure
#make headers
#cd ../examples/VFS/samba-vscan-0.3.6c-beta5/
#./configure
#make
#cp vscan*.so /usr/lib/samba/vfs/
#cp */vscan-*.conf /etc/samba/
接下來裝clamav
#yum install clamav*
再smb.conf也要加入支援samba-vscan,請再全域設定加入以下選項
vfs object = vscan-clamav
vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
接著要修改 /etc/samba/vscan-clamav.conf 設定
max file size = 0 (設定部掃描超過多少bytes的檔案,”0”不設限)
verbose file logging = yes (是否產生記錄)
scan on open = yes (檔案開啟時掃描)
scan on close = yes (檔案關閉時掃描)
deny access on error = yes (設定當 samba-vscan 無法呼叫掃毒模組時是否要拒絕所有檔案存取)
deny access on minor error = yes (設定當 samba-vscan發生任何細微錯誤時是否要拒絕所有檔案存取)
send warning message = yes (設定當samba-vscan發現病毒時,要不要使用 windows messenger 送出警告)
infected file action = quarantine (發現病毒時動作  delete 刪除quarantine 隔離 nothing 沒事不作任何動作)
quarantine directory  = /tmp (隔離目錄)
quarantine prefix = vir-       (隔離檔標頭名稱)
clamd socket name = /tmp/clamd (請設定與 /etc/clamd.conf 裡LocalSocket 的值相同)
最後重新啟動 samba 及 clamav
開啟window xp messenger 服務


測試訊息傳遞






測試防毒效果,先去
http://www.eicar.org/anti_virus_test_file.htm
下載測試病毒,再轉存到samba上

               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7546/showart_2162729.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP