С-ICAP ВОПРОС

Проблемы установки, настройки и работы Правильной Операционной Системы

Модератор: terminus

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Аватара пользователя
Dolphin_BSD
ст. сержант
Сообщения: 353
Зарегистрирован: 2007-04-26 9:09:10
Откуда: Kiev
Контактная информация:

Re: С-ICAP ВОПРОС

Непрочитанное сообщение Dolphin_BSD » 2009-05-28 0:59:21

Squid 2.7 - держит С_ИСАП ?

Мне відает ошибки на стоки

Код: Выделить всё

icap_enable on
icap_preview_enable on
icap_preview_size -1
icap_send_client_ip on
icap_send_client_username on
icap_service            service_avi_req reqmod_precache 0 icap://localhost:1344/srv_clamav
icap_service            service_avi respmod_precache 1 icap://localhost:1344/srv_clamav
icap_class           class_antivirus service_avi service_avi_req

icap_access class_antivirus allow all
_______________________________________________________________________________
Каждая секунда жизни имеет собственную цену, которую необходимо вовремя заплатить.
http://www.ftl.com.ua

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

D_CPU350
рядовой
Сообщения: 39
Зарегистрирован: 2008-06-11 17:06:40
Контактная информация:

Re: С-ICAP ВОПРОС

Непрочитанное сообщение D_CPU350 » 2009-05-28 8:13:16

пропатчить нужно

anton4
рядовой
Сообщения: 40
Зарегистрирован: 2009-04-26 13:30:03

Re: С-ICAP ВОПРОС

Непрочитанное сообщение anton4 » 2009-06-01 9:42:38

Спасибо за содержательную и информативную беседу. Очень много подчерпнул. Но сам в итоге пришел к связке squid -> bfilter. от антивируса вынужден был отказаться потому что скачивать файлы с ним глупо так как сначала он, антивирус, этот файл сам скачивает, проверяет и уже потом дает тебе, а проверять странички в основном бесполезно. Защиту клиентов от вредоносного по предлагаю развертывать на месте т.е у клиента на машине.

GGGG
проходил мимо

Re: С-ICAP ВОПРОС

Непрочитанное сообщение GGGG » 2009-10-07 15:58:00

Ребята ХЕЛП. Не могу запустить С-ICAP

Код: Выделить всё

# /usr/local/bin/c-icap -N -D -d 10
Enabling parameter -D
Setting parameter :-d=10
Searching 0x805d02c for default value
Setting parameter :PidFile=/var/run/c-icap.pid
Searching 0x805d030 for default value
Setting parameter :CommandsSocket=/var/run/c-icap/c-icap.ctl
Searching 0x805d050 for default value
Setting parameter :Timeout=300
Searching 0x805d058 for default value
Setting parameter :MaxKeepAliveRequests=100
Searching 0x805d054 for default value
Setting parameter :KeepAliveTimeout=600
Searching 0x805d060 for default value
Setting parameter :StartServers=3
Searching 0x805d064 for default value
Setting parameter :MaxServers=10
Searching 0x805d06c for default value
Setting parameter :MinSpareThreads=10
Searching 0x805d070 for default value
Setting parameter :MaxSpareThreads=20
Searching 0x805d068 for default value
Setting parameter :ThreadsPerChild=10
Searching 0x805d824 for default value
Setting parameter :MaxRequestsPerChild=0
Searching 0x805d020 for default value
Setting parameter :Port=1344
Searching 0x805d034 for default value
Setting parameter :User=cicap
Searching 0x805d038 for default value
Setting parameter :Group=cicap
Searching 0x805d028 for default value
Setting parameter :TmpDir=/var/tmp
Searching 0x805d804 for default value
Setting parameter :MaxMemObject=131072
Searching 0x805d3d0 for default value
Setting parameter :ServerLog=/var/log/c_icap/server.log
Searching 0x805d3d4 for default value
Setting parameter :AccessLog=/var/log/c_icap/access.log
Searching 0x805d04c for default value
Setting parameter :ModulesDir=/usr/local/lib/c_icap
Loading service :logger path sys_logger.so
Registering conf table:sys_logger
Loading service :perl_handler path perl_handler.so
Uknown type of module:perl_handler
Error loading service
Going to search variable Prefix in table sys_logger
Setting parameter :Prefix=C-ICAP:
Going to search variable Facility in table sys_logger
Setting parameter :Logger=file_logger
Searching 0x805d048 for default value
Setting parameter :ServicesDir=/usr/local/lib/c_icap
Loading service :echo_module path srv_echo.so
Found handler C_handler for service with extension:.so
Initialization of echo module......
Loading service :url_check_module path srv_url_check.so
Found handler C_handler for service with extension:.so
Initialization of url_check module......
Loading service :antivirus_module path srv_clamav.so
Found handler C_handler for service with extension:.so
Going to initialize srvclamav
Registering conf table:srv_clamav
Registering conf table:antivirus_module
Alias:avscan of service srv_clamav
Registering conf table:avscan
Going to search variable ScanFileTypes in table srv_clamav
Iam going to scan data for simple scanning of type:,GIF,JPEG,MSOFFICE,TEXT,DATA,EXECUTABLE,ARCHIVE
Going to search variable SendPercentData in table srv_clamav
Setting parameter :SendPercentData=5
Going to search variable StartSendPercentDataAfter in table srv_clamav
Setting parameter :StartSendPercentDataAfter=2097152
Going to search variable MaxObjectSize in table srv_clamav
Setting parameter :MaxObjectSize=5242880
Going to search variable ClamAvMaxFilesInArchive in table srv_clamav
Setting parameter :ClamAvMaxFilesInArchive=0
Going to search variable ClamAvMaxFileSizeInArchive in table srv_clamav
Setting parameter :ClamAvMaxFileSizeInArchive=104857600
Going to search variable ClamAvMaxRecLevel in table srv_clamav
Setting parameter :ClamAvMaxRecLevel=5
Going to search variable VirSaveDir in table srv_clamav
Setting parameter :VirSaveDir=/srv/www/htdocs/downloads/
Going to search variable VirHTTPServer in table srv_clamav
Setting parameter :VirHTTPServer=http://fortune/cgi-bin/get_file.pl?usename=%f&remove=1&file=
Going to search variable VirUpdateTime in table srv_clamav
Setting parameter :VirUpdateTime=15
Going to search variable VirScanFileTypes in table srv_clamav
Iam going to scan data for vir_mode scanning of type:,EXECUTABLE,ARCHIVE
My hostname is:gateway.hl8.dom
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Child 30056 getting requests now ...
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
^CSIGINT signal received for main server.
Possibly a term signal received. Monitor process going to term all childs
Going to term childs....
A termination signal received (15).
proc_mutex_lock interrupted (EINTR received, pid=30054)!
Listener of pid:30054 exiting!
A termination signal received (15).
proc_mutex_lock interrupted (EINTR received, pid=30055)!
Listener of pid:30055 exiting!
c-icap.conf

Код: Выделить всё

#
# This file contains the default settings for c-icap
#


PidFile /var/run/c-icap.pid
CommandsSocket /var/run/c-icap/c-icap.ctl
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
## set KeepAliveTimeout to -1 for no timeout
KeepAliveTimeout 600  
StartServers 3
MaxServers 10
MinSpareThreads     10
MaxSpareThreads     20
ThreadsPerChild     10
MaxRequestsPerChild  0


Port 1344 
User cicap
Group cicap


#ServerAdmin you@your.address # Not implemented yet
#ServerName localhost:1344 # Not implemented yet

TmpDir /var/tmp
MaxMemObject 131072

ServerLog /var/log/c_icap/server.log
AccessLog /var/log/c_icap/access.log
#DebugLevel 3

ModulesDir /usr/local/lib/c_icap
Module logger sys_logger.so
Module perl_handler perl_handler.so

sys_logger.Prefix "C-ICAP:"
sys_logger.Facility local1

##Specify wich logger to use......
#Logger sys_logger
Logger file_logger

## AclControlers example. The default_acl is the buildin acl controller
## To load an extrernal access controller named my_acl.so use:
#Module access_controller  my_acl.so

## This parameter needed to specify the order of used acl controllers
## If not specified access control will be disabled
#AclControllers default_acl

## An example of acl lists for default_acl controller.
## acl and icap_access  are aliases for default_acl.acl and default_acl.icap_access 
#acl localnet_options src 192.168.1.0/255.255.255.0 type options
#acl localnet_respmod src 192.168.1.0/255.255.255.0 type respmod
#acl localnet src 192.168.1.0/255.255.255.0
##Use the folllowing to demand use of username ......
##acl localnet src 192.168.1.0/255.255.255.0 user *
#acl externalnet src 0.0.0.0/0.0.0.0
#acl barbarian src 192.168.1.5

##An example to specify access to server
#icap_access deny barbarian
#icap_access allow localnet_options
#icap_access allow localnet_respmod
#icap_access allow localnet
## http_auth mean that the icap server must try to authenticate the request
## using the http headers ....
#icap_access  http_auth localnet
#icap_access deny externalnet

#Also you can specify which hosts to log or not.
# Comment out the folowing two lines to log only the external net
#icap_access nolog localnet
#icap_access log externalnet



##An example for authentication methods ....
## To load an extarnal authentication method module named my_authmethod.so  use:
#Module auth_method my_authmethod.so

##The following parameter needed to specify the order of authenticators for
##specific authentication method. file_basic is a buildin authenticator
##for buildin basic authentication method (Not implemented yet......) ......
#AuthMethod basic file_basic 


ServicesDir /usr/local/lib/c_icap
Service echo_module srv_echo.so
Service url_check_module srv_url_check.so
Service antivirus_module srv_clamav.so

##Adding the alias avscan for srv_clamav service. 
ServiceAlias  avscan srv_clamav?allow204=on&sizelimit=off&mode=simple


# Antivirus module settings
# For allowed file types or groups of file types look at  c-icap.magic
srv_clamav.ScanFileTypes TEXT DATA EXECUTABLE ARCHIVE GIF JPEG MSOFFICE
#The percentage of data to sent if the downloaded file exceeds the StartSendPercentDataAfter size
srv_clamav.SendPercentData 5
srv_clamav.StartSendPercentDataAfter 2M

##Comment out the following line to enable 204 responces outside previews for srv_clamav
## if your icap client support it. For squid let it off
#srv_clamav.Allow204Responces on

# The Maximum object to be scanned.
srv_clamav.MaxObjectSize  5M
#The directory which clamav library will use as temporary.
#srv_clamav.ClamAvTmpDir /var/tmp
#Sets the maximum number of files in archive.)i Set it to 0 to disable it
srv_clamav.ClamAvMaxFilesInArchive 0
#Sets the maximal archived file size. Set it to 0 to disable it.
srv_clamav.ClamAvMaxFileSizeInArchive 100M
#The maximal recursion level.Set it to 0 to disable it.
srv_clamav.ClamAvMaxRecLevel 5

# And here the viralator-like mode.
# where to save documents
srv_clamav.VirSaveDir /srv/www/htdocs/downloads/
# from where the documents can be retrieved (you can find the get_file.pl script in contrib dir)
srv_clamav.VirHTTPServer  "http://fortune/cgi-bin/get_file.pl?usename=%f&remove=1&file="
# The refresh  rate....
srv_clamav.VirUpdateTime   15
# For which filetypes the "virelator like mode" will be used.
srv_clamav.VirScanFileTypes ARCHIVE EXECUTABLE
на виртуальной машине работало, сейчас не могу настроить.

Гость
проходил мимо

Re: С-ICAP ВОПРОС

Непрочитанное сообщение Гость » 2009-10-07 15:58:32

GGGG писал(а):Ребята ХЕЛП. Не могу запустить С-ICAP

Код: Выделить всё

# /usr/local/bin/c-icap -N -D -d 10
Enabling parameter -D
Setting parameter :-d=10
Searching 0x805d02c for default value
Setting parameter :PidFile=/var/run/c-icap.pid
Searching 0x805d030 for default value
Setting parameter :CommandsSocket=/var/run/c-icap/c-icap.ctl
Searching 0x805d050 for default value
Setting parameter :Timeout=300
Searching 0x805d058 for default value
Setting parameter :MaxKeepAliveRequests=100
Searching 0x805d054 for default value
Setting parameter :KeepAliveTimeout=600
Searching 0x805d060 for default value
Setting parameter :StartServers=3
Searching 0x805d064 for default value
Setting parameter :MaxServers=10
Searching 0x805d06c for default value
Setting parameter :MinSpareThreads=10
Searching 0x805d070 for default value
Setting parameter :MaxSpareThreads=20
Searching 0x805d068 for default value
Setting parameter :ThreadsPerChild=10
Searching 0x805d824 for default value
Setting parameter :MaxRequestsPerChild=0
Searching 0x805d020 for default value
Setting parameter :Port=1344
Searching 0x805d034 for default value
Setting parameter :User=cicap
Searching 0x805d038 for default value
Setting parameter :Group=cicap
Searching 0x805d028 for default value
Setting parameter :TmpDir=/var/tmp
Searching 0x805d804 for default value
Setting parameter :MaxMemObject=131072
Searching 0x805d3d0 for default value
Setting parameter :ServerLog=/var/log/c_icap/server.log
Searching 0x805d3d4 for default value
Setting parameter :AccessLog=/var/log/c_icap/access.log
Searching 0x805d04c for default value
Setting parameter :ModulesDir=/usr/local/lib/c_icap
Loading service :logger path sys_logger.so
Registering conf table:sys_logger
Loading service :perl_handler path perl_handler.so
Uknown type of module:perl_handler
Error loading service
Going to search variable Prefix in table sys_logger
Setting parameter :Prefix=C-ICAP:
Going to search variable Facility in table sys_logger
Setting parameter :Logger=file_logger
Searching 0x805d048 for default value
Setting parameter :ServicesDir=/usr/local/lib/c_icap
Loading service :echo_module path srv_echo.so
Found handler C_handler for service with extension:.so
Initialization of echo module......
Loading service :url_check_module path srv_url_check.so
Found handler C_handler for service with extension:.so
Initialization of url_check module......
Loading service :antivirus_module path srv_clamav.so
Found handler C_handler for service with extension:.so
Going to initialize srvclamav
Registering conf table:srv_clamav
Registering conf table:antivirus_module
Alias:avscan of service srv_clamav
Registering conf table:avscan
Going to search variable ScanFileTypes in table srv_clamav
Iam going to scan data for simple scanning of type:,GIF,JPEG,MSOFFICE,TEXT,DATA,EXECUTABLE,ARCHIVE
Going to search variable SendPercentData in table srv_clamav
Setting parameter :SendPercentData=5
Going to search variable StartSendPercentDataAfter in table srv_clamav
Setting parameter :StartSendPercentDataAfter=2097152
Going to search variable MaxObjectSize in table srv_clamav
Setting parameter :MaxObjectSize=5242880
Going to search variable ClamAvMaxFilesInArchive in table srv_clamav
Setting parameter :ClamAvMaxFilesInArchive=0
Going to search variable ClamAvMaxFileSizeInArchive in table srv_clamav
Setting parameter :ClamAvMaxFileSizeInArchive=104857600
Going to search variable ClamAvMaxRecLevel in table srv_clamav
Setting parameter :ClamAvMaxRecLevel=5
Going to search variable VirSaveDir in table srv_clamav
Setting parameter :VirSaveDir=/srv/www/htdocs/downloads/
Going to search variable VirHTTPServer in table srv_clamav
Setting parameter :VirHTTPServer=http://fortune/cgi-bin/get_file.pl?usename=%f&remove=1&file=
Going to search variable VirUpdateTime in table srv_clamav
Setting parameter :VirUpdateTime=15
Going to search variable VirScanFileTypes in table srv_clamav
Iam going to scan data for vir_mode scanning of type:,EXECUTABLE,ARCHIVE
My hostname is:gateway.hhh.dim
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Child 30056 getting requests now ...
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Waiting for a request....
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
Server stats:
         Childs:3
         Free servers:30
        Used servers:0
        Requests served:0
^CSIGINT signal received for main server.
Possibly a term signal received. Monitor process going to term all childs
Going to term childs....
A termination signal received (15).
proc_mutex_lock interrupted (EINTR received, pid=30054)!
Listener of pid:30054 exiting!
A termination signal received (15).
proc_mutex_lock interrupted (EINTR received, pid=30055)!
Listener of pid:30055 exiting!
c-icap.conf

Код: Выделить всё

#
# This file contains the default settings for c-icap
#


PidFile /var/run/c-icap.pid
CommandsSocket /var/run/c-icap/c-icap.ctl
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
## set KeepAliveTimeout to -1 for no timeout
KeepAliveTimeout 600  
StartServers 3
MaxServers 10
MinSpareThreads     10
MaxSpareThreads     20
ThreadsPerChild     10
MaxRequestsPerChild  0


Port 1344 
User cicap
Group cicap


#ServerAdmin you@your.address # Not implemented yet
#ServerName localhost:1344 # Not implemented yet

TmpDir /var/tmp
MaxMemObject 131072

ServerLog /var/log/c_icap/server.log
AccessLog /var/log/c_icap/access.log
#DebugLevel 3

ModulesDir /usr/local/lib/c_icap
Module logger sys_logger.so
Module perl_handler perl_handler.so

sys_logger.Prefix "C-ICAP:"
sys_logger.Facility local1

##Specify wich logger to use......
#Logger sys_logger
Logger file_logger

## AclControlers example. The default_acl is the buildin acl controller
## To load an extrernal access controller named my_acl.so use:
#Module access_controller  my_acl.so

## This parameter needed to specify the order of used acl controllers
## If not specified access control will be disabled
#AclControllers default_acl

## An example of acl lists for default_acl controller.
## acl and icap_access  are aliases for default_acl.acl and default_acl.icap_access 
#acl localnet_options src 192.168.1.0/255.255.255.0 type options
#acl localnet_respmod src 192.168.1.0/255.255.255.0 type respmod
#acl localnet src 192.168.1.0/255.255.255.0
##Use the folllowing to demand use of username ......
##acl localnet src 192.168.1.0/255.255.255.0 user *
#acl externalnet src 0.0.0.0/0.0.0.0
#acl barbarian src 192.168.1.5

##An example to specify access to server
#icap_access deny barbarian
#icap_access allow localnet_options
#icap_access allow localnet_respmod
#icap_access allow localnet
## http_auth mean that the icap server must try to authenticate the request
## using the http headers ....
#icap_access  http_auth localnet
#icap_access deny externalnet

#Also you can specify which hosts to log or not.
# Comment out the folowing two lines to log only the external net
#icap_access nolog localnet
#icap_access log externalnet



##An example for authentication methods ....
## To load an extarnal authentication method module named my_authmethod.so  use:
#Module auth_method my_authmethod.so

##The following parameter needed to specify the order of authenticators for
##specific authentication method. file_basic is a buildin authenticator
##for buildin basic authentication method (Not implemented yet......) ......
#AuthMethod basic file_basic 


ServicesDir /usr/local/lib/c_icap
Service echo_module srv_echo.so
Service url_check_module srv_url_check.so
Service antivirus_module srv_clamav.so

##Adding the alias avscan for srv_clamav service. 
ServiceAlias  avscan srv_clamav?allow204=on&sizelimit=off&mode=simple


# Antivirus module settings
# For allowed file types or groups of file types look at  c-icap.magic
srv_clamav.ScanFileTypes TEXT DATA EXECUTABLE ARCHIVE GIF JPEG MSOFFICE
#The percentage of data to sent if the downloaded file exceeds the StartSendPercentDataAfter size
srv_clamav.SendPercentData 5
srv_clamav.StartSendPercentDataAfter 2M

##Comment out the following line to enable 204 responces outside previews for srv_clamav
## if your icap client support it. For squid let it off
#srv_clamav.Allow204Responces on

# The Maximum object to be scanned.
srv_clamav.MaxObjectSize  5M
#The directory which clamav library will use as temporary.
#srv_clamav.ClamAvTmpDir /var/tmp
#Sets the maximum number of files in archive.)i Set it to 0 to disable it
srv_clamav.ClamAvMaxFilesInArchive 0
#Sets the maximal archived file size. Set it to 0 to disable it.
srv_clamav.ClamAvMaxFileSizeInArchive 100M
#The maximal recursion level.Set it to 0 to disable it.
srv_clamav.ClamAvMaxRecLevel 5

# And here the viralator-like mode.
# where to save documents
srv_clamav.VirSaveDir /srv/www/htdocs/downloads/
# from where the documents can be retrieved (you can find the get_file.pl script in contrib dir)
srv_clamav.VirHTTPServer  "http://fortune/cgi-bin/get_file.pl?usename=%f&remove=1&file="
# The refresh  rate....
srv_clamav.VirUpdateTime   15
# For which filetypes the "virelator like mode" will be used.
srv_clamav.VirScanFileTypes ARCHIVE EXECUTABLE
на виртуальной машине работало, сейчас не могу настроить.