squid+squidclam (не работает связка squid+squidclam)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

dio
Сообщения: 102
ОС: Ubuntu

squid+squidclam

Сообщение dio »

Добрый день. Система Mandriva_2007. Поставлена была задача фильтрации трафика пользователей, работающих через прокси squid. Установил squidclam. Внес те параметры в squid.conf что рекомендовались в /usr/share/doc/squidclam. Вроде все ясно было. Сам clamd работает(как мне кажется Smile в локальном режиме через localsocket. Путь проверил к нему в clamd.conf, все верно вроде. Ошибок в /var/log/messages по работе squidclam нет, но при попытке скачать файл на eicar.com через браузер, настроенный на прокси squid+squidclam никаких сообщений в самом браузере и логах нет. Помогите пожалуйста разобраться. Заранее благодарен.
Software is like sex: It's better when it's free.
Спасибо сказали:
Аватара пользователя
Snupt
Бывший модератор
Сообщения: 2062
Статус: No Place for RTFM Here…
ОС: Mac OS X

Re: squid+squidclam

Сообщение Snupt »

Это не дистрибутивоспецифичная проблема. Переношу в раздел Администрирование.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

лучше через порт 3310, все работает. В файлах конфиг. есть пример настройки.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Так помоги пжл с конфигами. Покажи свои...я наверное ошибаюсь где то. Спасибо заранее.
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

Смотри личку
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Есть у кого то еще предложения по этой проблеме? Буду очень благодарен. Пока дело не продвинулось...сам прокси работает, но как только добавить ему строки для перенаправления на squidclam - redirect_program /usr/sbin/squidclam то все - мертво все "задумывается" и никого движения ...и в логах пусто....
если есть у кого работающие конфиги, буду ОЧЕНЬ благодарен. Спасибо заранее.
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

какие рабочие конфиги, прокси просто работает, без редиректа. Два конфига могу скинуть
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

я конечно только пытаюсь разобраться, но в squid.conf надо же указывать redirect_program /usr/sbin/squidclam так написано в доках во всяком случае.
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

dio писал(а):
19.12.2006 17:57
я конечно только пытаюсь разобраться, но в squid.conf надо же указывать redirect_program /usr/sbin/squidclam так написано в доках во всяком случае.

Да надо, я тебе конфиги в личку кинул.
Может у тебя /usr/sbin/squidclam не здесь?
А так мои конфиги рабочие.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Я спросил #whereis clamd мне ответили /usr/sbin/clamd так что все на месте вроде...
я же не говорю, что у тебя нерабочий конфиг, я говорю, что у меня накасячено где то...вот где? Поэтому и прошу помощи...спасибо тебе большое...я подумал, можем "хлам" как то не так установлен? Я ставил стандартно - из пакетов дистрибутива...может что то не доставил? Библиотеку или еще что...
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

whereis squidclam - что говорит
и еще если у тебя не запущен clamd то в броузере должно быть что-то не могу найти страницу antivir.php 127.0.0.1
посмотри top есть запущ процессы.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

/usr/sbin/squidclam....есть такой. В процессах тоже есть clamd
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

redirect_children 50

acl inet .... твоя сеть
redirector_access allow inet

от какого польз запускаются демоны, может нет прав на каталоги где антивир проверяет

попробуй clamd остановить, что без него получиш в браузере
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Остановил clamd, перезапустил прокси, - пишет "ошибка прокси - не могу доставить адрес http://127.0.01/antivirus.php? "
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

dio писал(а):
20.12.2006 12:33
Остановил clamd, перезапустил прокси, - пишет "ошибка прокси - не могу доставить адрес http://127.0.01/antivirus.php? "

Копай антивирус, все до него работает.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Ок...я тоже чето на него думал...но ведь эта мандрива сама все ставила из пакетов с соблюдением зависимостей и тд и тп...вот дерь...о!!! :lol: :D
если сделаю - отпишу, спасибо за помощь и терпение.
Software is like sex: It's better when it's free.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Так...сделал, но есть ряд "но" :)
1. Ось Центос 4,3 + установил clamav из сырцов + havp из сырцов
2. Доки были встроенный в программы, те и читал.
Проблемы:
1 При тестировании на странице http://www.eicar.org/anti_virus_test_file.htm пишет virus found при попытке скачать eicar.com.txt eicarcom2.zip а вот файлы eicar.com и eicar_com.zip дает свободно скачать, без крика и шума - почему?

Буду очень рад пояснениям, надеюсь на kvs :)
Software is like sex: It's better when it's free.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

содержимое access.log

20/12/2006 17:09:47 http://www.eicar.org/anti_virus_test_file.htm 80 OK
20/12/2006 17:09:50 http://www.eicar.org/print.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_nav.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_css.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/calendar.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/all/2top_eicar_logo.gif 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/about_us/hgk_about_us.jpg 80 OK
20/12/2006 17:09:55 http://www.eicar.org/image/all/1top_eicar.gif 80 OK
20/12/2006 17:09:56 http://www.eicar.org/download/eicar.com.txt Virus:
20/12/2006 17:09:56 http://www.eicar.org/image/nav/nav_grey.gif 80 OK
20/12/2006 17:10:06 http://www.eicar.org/download/eicarcom2.zip Virus:
20/12/2006 17:10:43 http://sb.google.com/safebrowsing/update?c...enchash:1:14900 80 OK

вот на одних файлах ОК, а на других пишет что .....icar.com.txt[url] Virus: как его понять?


а это havp.log

20/12/2006 17:09:21 Starting Havp Version: 0.62
20/12/2006 17:09:21 Change to User nobody
20/12/2006 17:09:21 Change to Group nogroup
20/12/2006 17:09:24 Loaded 84748 signatures
20/12/2006 17:09:56 Virus Eicar-Test-Signature in file /var/tmp/havp/havp-uzss9p detect!
20/12/2006 17:09:56 Could not partial unlock Scannerfile: /var/tmp/havp/havp-uzss9p
20/12/2006 17:10:06 Virus Eicar-Test-Signature in file /var/tmp/havp/havp-5PJlaq detect!
20/12/2006 17:10:06 Could not partial unlock Scannerfile: /var/tmp/havp/havp-5PJlaq

меня тревожат еще эти сообщения Could not partial unlock.... что бы это могло значить??
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

dio писал(а):
20.12.2006 16:41
Так...сделал, но есть ряд "но" :)
1. Ось Центос 4,3 + установил clamav из сырцов + havp из сырцов
2. Доки были встроенный в программы, те и читал.
Проблемы:
1 При тестировании на странице http://www.eicar.org/anti_virus_test_file.htm пишет virus found при попытке скачать eicar.com.txt eicarcom2.zip а вот файлы eicar.com и eicar_com.zip дает свободно скачать, без крика и шума - почему?

Буду очень рад пояснениям, надеюсь на kvs :)


покажи clamd.log
не путаеш случаем, eicarcom2.zip и eicar_com.zip могут пропускаться если у тебя нет архиватора, и еще обнови базы и сам clamav версия какая. У меня репозиторий все обновляется 2 раза в сутки.

clamd.log
Wed Dec 20 16:22:10 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:37 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:41 2006 -> /dev/shm/squidclamXXhc62mF: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:46 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:49 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND

/var/log/message
Dec 20 16:22:10 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar.com virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:10 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:37 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar.com virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:37 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:41 tiger clamd[2032]: /dev/shm/squidclamXXhc62mF: Eicar-Test-Signature FOUND
Dec 20 16:22:41 tiger squidclam[13079]: INFECTED url=http://www.eicar.org/download/eicar.com.txt virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:46 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar_com.zip virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:46 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:49 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicarcom2.zip virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:49 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND


(dio @ Dec 20 2006, в 17:07) писал(а):меня тревожат еще эти сообщения Could not partial unlock.... что бы это могло значить??

смотри на права, от чьего имени запуск демон, прива на папку куда ложатся врем файлы.

(dio @ Dec 20 2006, в 17:07) писал(а):меня тревожат еще эти сообщения Could not partial unlock.... что бы это могло значить??

смотри на права, от чьего имени запуск демон, прива на папку куда ложатся врем файлы.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

havp под nobody, clamav под clamav. Смонтированная fs принадлежит root (хоть я и менял права...) и группе root, но я добавил пользователя nobody группу root - перестал гавкать.
Насчет файлов НЕ путаю...я же логи показал...
версия хлама 0.88.7 (последняя) а вот havp 0.62 не свежий.
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

20/12/2006 17:09:47 http://www.eicar.org/anti_virus_test_file.htm 80 OK
20/12/2006 17:09:50 http://www.eicar.org/print.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_nav.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_css.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/calendar.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/all/2top_eicar_logo.gif 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/about_us/hgk_about_us.jpg 80 OK
20/12/2006 17:09:55 http://www.eicar.org/image/all/1top_eicar.gif 80 OK
20/12/2006 17:09:56 http://www.eicar.org/download/eicar.com.txt Virus:
20/12/2006 17:09:56 http://www.eicar.org/image/nav/nav_grey.gif 80 OK
20/12/2006 17:10:06 http://www.eicar.org/download/eicarcom2.zip Virus:
20/12/2006 17:10:43 http://sb.google.com/safebrowsing/update?c...enchash:1:14900 80 OK

так здесь все ОК, два файла качать с вирусом, он их обнаруж,

20/12/2006 17:09:52 http://www.eicar.org/image/all/2top_eicar_logo.gif 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/about_us/hgk_about_us.jpg 80 OK
здесь что тоже вирус лежит.

Я же писал, попробуй скачать файлы c
http://www.eicar.org/anti_virus_test_file.htm
eicar.com
68 Bytes
eicar.com.txt
68 Bytes
eicar_com.zip
184 Bytes
eicarcom2.zip
308 Bytes
и посмотри clamd.log
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

kvs писал(а):
20.12.2006 18:22
20/12/2006 17:09:47 http://www.eicar.org/anti_virus_test_file.htm 80 OK
20/12/2006 17:09:50 http://www.eicar.org/print.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_nav.css 80 OK
20/12/2006 17:09:51 http://www.eicar.org/eicar_css.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/calendar.css 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/all/2top_eicar_logo.gif 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/about_us/hgk_about_us.jpg 80 OK
20/12/2006 17:09:55 http://www.eicar.org/image/all/1top_eicar.gif 80 OK
20/12/2006 17:09:56 http://www.eicar.org/download/eicar.com.txt Virus:
20/12/2006 17:09:56 http://www.eicar.org/image/nav/nav_grey.gif 80 OK
20/12/2006 17:10:06 http://www.eicar.org/download/eicarcom2.zip Virus:
20/12/2006 17:10:43 http://sb.google.com/safebrowsing/update?c...enchash:1:14900 80 OK

так здесь все ОК, два файла качать с вирусом, он их обнаруж,

20/12/2006 17:09:52 http://www.eicar.org/image/all/2top_eicar_logo.gif 80 OK
20/12/2006 17:09:52 http://www.eicar.org/image/about_us/hgk_about_us.jpg 80 OK
здесь что тоже вирус лежит.

Я же писал, попробуй скачать файлы c
http://www.eicar.org/anti_virus_test_file.htm
eicar.com
68 Bytes
eicar.com.txt
68 Bytes
eicar_com.zip
184 Bytes
eicarcom2.zip
308 Bytes
и посмотри clamd.log


ТАК Я ТАК И СДЕЛАЛ сразу (я тебе уже наверное голову заморочил) :-). Посмотри - на тех файлах что он обнаруживает, он пишет VIRUS-это как раз http://www.eicar.org/download/eicar.com.txt Virus:
и http://www.eicar.org/download/eicarcom2.zip Virus: а остальные два не видит - это
http://www.eicar.org/anti_virus_test_file.htm 80 OK и простой zip. Пишет ОК (имея ввиду что дает возможность их закачать...этож прокси сервер все же). Я же и говорю про это - ПОЧЕМУ ТАК?? :o
И еще нюанс - я его настроил на работу со squid как с parent proxy, но в логах squid НЕ вижу (access.log) чтобы к нему хоть кто то подсоединялся...почему?

еще кое что накопал - на сайте eicar авторы пишут:
The first, eicar.com, contains the ASCII string as described above. The second file, eicar.com.txt, is a copy of this file with a different filename. Some readers reported problems when downloading the first file, which can be circumvented when using the second version
Те-первый и второй отличаются только именем, но НЕКОТОРЫЕ пользователи жалуются на проблемы при закачке ПЕРВОГО файла ( у меня его тоже антивирус не видит), который может обманывать при его же использованиии во второй версии. Это и есть трюк, который видно при переименовании файла.(У меня первый НЕ видит, второй ВИДИТ антивирус). Простите за перевод :-)
И еще - Good scanners will detect the 'virus' in the single zip ARCHIVEe and may be even in the double zip ARCHIVEe.
Получается, что в простом zip архиве мой НЕ видит, а в ДВОЙНОМ видит...хотя по описанию должно быть скорее наоборот. Вот такие вопросы остаются..... :)
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

Вот три ссылки, ставь их по очереди в браузер, и попробуй скачать, затем покажи что тебе покажет clamd.log

http://www.eicar.org/download/eicar.com.txt
http://www.eicar.org/download/eicar.com
http://www.eicar.org/download/eicar_com.zip
http://www.eicar.org/download/eicarcom2.zip

Насколько я понимаю http://www.eicar.org/anti_virus_test_file.htm 80 OK все правильно, это просто HTML страничка и никакого вируса здесь нет

Зачем тебе два прокси, если используеш squid, зачем HAVP??????? не вижу смысла такую цепочку городить.

Я тебе уже показывал, это у меня
/var/log/message
Dec 20 16:22:10 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar.com virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:10 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:37 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar.com virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:37 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:41 tiger clamd[2032]: /dev/shm/squidclamXXhc62mF: Eicar-Test-Signature FOUND
Dec 20 16:22:41 tiger squidclam[13079]: INFECTED url=http://www.eicar.org/download/eicar.com.txt virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:46 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicar_com.zip virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:46 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Dec 20 16:22:49 tiger squidclam[13077]: INFECTED url=http://www.eicar.org/download/eicarcom2.zip virus=Eicar-Test-Signature src=192.168.0.1/- ident=- method=GET
Dec 20 16:22:49 tiger clamd[2032]: /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND


clamd.log
Wed Dec 20 16:22:10 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:37 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:41 2006 -> /dev/shm/squidclamXXhc62mF: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:46 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND
Wed Dec 20 16:22:49 2006 -> /dev/shm/squidclamXXpDts3I: Eicar-Test-Signature FOUND

покажи строки после пробования закачки из твоих лог файлов, без них говорить больше неочем.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

в clamd.log ничего нет, кроме инфы о старте - привожу ее:
+++ Started at Thu Dec 21 14:41:00 2006
clamd daemon 0.88.7 (OS: linux-gnu, ARCH: i386, CPU: i686)
Log file size limited to 1048576 bytes.
Reading databases from /usr/local/share/clamav
+++ Started at Thu Dec 21 14:41:21 2006
clamd daemon 0.88.7 (OS: linux-gnu, ARCH: i386, CPU: i686)
Log file size limited to 1048576 bytes.
Reading databases from /usr/local/share/clamav
Protecting against 84748 viruses.
Unix socket file /var/run/clamd.sock
Setting connection queue length to 15
Archive: Archived file size limit set to 10485760 bytes.
Archive: Recursion level limit set to 8.
Archive: Files limit set to 1000.
Archive: Compression ratio limit set to 250.
Archive support enabled.
Archive: RAR support enabled.
Portable Executable support enabled.
Mail files support enabled.
Mail: Recursion level limit set to 64.
OLE2 support enabled.
HTML support enabled.
Self checking every 1800 seconds.

время сбито - система на VMWARE :-)
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

Тогда разберись в твоей цепочке, что нагородил, в файлах конфиг, (смотри мои конфиги, кот высылал).
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

файл /var/log/havp/access.log

21/12/2006 14:51:21 http://linuxforum.ru/index.php?showtopic=3...=&st=0& 80 OK
21/12/2006 14:51:22 http://counter.yadro.ru/hit?t14.11;rhttp%3...206013152491264 80 OK
21/12/2006 14:51:22 http://top.list.ru/counter?id=713972;t=57;...060891183076985 80 OK
21/12/2006 14:51:28 http://www.eicar.org/download/eicar.com.txt Virus:
21/12/2006 14:51:45 http://www.eicar.org/download/eicarcom2.zip Virus:

и файл /var/log/havp/havp.log

21/12/2006 14:51:06 Starting Havp Version: 0.62
21/12/2006 14:51:06 Change to User nobody
21/12/2006 14:51:06 Change to Group nogroup
21/12/2006 14:51:11 Loaded 84748 signatures
21/12/2006 14:51:28 Virus Eicar-Test-Signature in file /var/tmp/havp/havp-2DjtVO detect!
21/12/2006 14:51:28 Could not partial unlock Scannerfile: /var/tmp/havp/havp-2DjtVO
21/12/2006 14:51:45 Virus Eicar-Test-Signature in file /var/tmp/havp/havp-x6xvYO detect!
21/12/2006 14:51:45 Could not partial unlock Scannerfile: /var/tmp/havp/havp-x6xvYO

ВОТ ТУТ вирусы видны! И там где я и говорил.

Извини меня kvs, но ты дал конфиги по squidclam и clamd, а я говорю уже havp+clamd ты наверное устал от меня :-) squidclam так и не заработал. Это хоть как то работает! И кстати, при попытке скачать по новой твои логи из моей "личной" почты тоже пишет "Не могу проверить архив" - ты наверное третьим RAR архивировал? Так и должно быть...работает значит, но как то странно...
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

Unix socket file /var/run/clamd.sock ?????????
где adress 127.0.0.1 on port 3310


читай свое самое первое сообщение "задача фильтрации трафика пользователей, работающих через прокси squid. Установил squidclam."

Определись что ты хочеш, зачем и как это реализовывать, говорим об одном делаем другое.
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

clamd.conf

# The daemon works in a local OR a network mode. Due to security reasons we
# recommend the local mode.

# Path to a local socket file the daemon will listen on.
# Default: disabled
LocalSocket /var/run/clamd.sock


у меня в локальном режиме, как и рекомендуют...что не так?

ну я же писал вчера еще....что перешел, ты не заметил...


Вчера, в 16:38
Сообщение #2

Так...сделал, но есть ряд "но" smile.gif
1. Ось Центос 4,3 + установил clamav из сырцов + havp из сырцов
2. Доки были встроенный в программы, те и читал.
Проблемы:
1 При тестировании на странице http://www.eicar.org/anti_virus_test_file.htm пишет virus found при попытке скачать eicar.com.txt eicarcom2.zip а вот файлы eicar.com и eicar_com.zip дает свободно скачать, без крика и шума - почему?

Буду очень рад пояснениям, надеюсь на kvs smile.gif

В каталоге /var/run есть файлы и clamd.sock и clamd.pid с номером процесса 14947
Software is like sex: It's better when it's free.
Спасибо сказали:
kvs
Сообщения: 84

Re: squid+squidclam

Сообщение kvs »

clamd.conf в студию

из сырцов ставил??? , а при установке не с ключами надо было ставить??
Спасибо сказали:
dio
Сообщения: 102
ОС: Ubuntu

Re: squid+squidclam

Сообщение dio »

Он огромный блин...

##
## Example config file for the Clam AV daemon
## Please read the clamd.conf(5) manual before editing this file.
##


# Comment or remove the line below.
#Example

# Uncomment this option to enable logging.
# LogFile must be writable for the user running daemon.
# A full path is required.
# Default: disabled
LogFile /var/log/clamd.log

# By default the log file is locked for writing - the lock protects against
# running clamd multiple times (if you want to run another clamd instance,
# please # copy the configuration file, change the LogFile variable, and run
# the daemon with the --config-file option).
# This option disables log file locking.
# Default: disabled
#LogFileUnlock

# Maximal size of the log file.
# Value of 0 disables the limit.
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
# in bytes just don't use modifiers.
# Default: 1M
#LogFileMaxSize 2M

# Log time with each message.
# Default: disabled
#LogTime

# Also log clean files. Useful in debugging but drastically increases the
# log size.
# Default: disabled
#LogClean

# Use system logger (can work together with LogFile).
# Default: disabled
#LogSyslog

# Specify the type of syslog messages - please refer to 'man syslog'
# for facility names.
# Default: LOG_LOCAL6
#LogFacility LOG_MAIL

# Enable verbose logging.
# Default: disabled
#LogVerbose

# This option allows you to save a process identifier of the listening
# daemon (main thread).
# Default: disabled
PidFile /var/run/clamd.pid

# Optional path to the global temporary directory.
# Default: system specific (usually /tmp or /var/tmp).
#TemporaryDirectory /var/tmp/clamav

# Path to the database directory.
# Default: hardcoded (depends on installation options)
#DatabaseDirectory /var/lib/clamav

# The daemon works in a local OR a network mode. Due to security reasons we
# recommend the local mode.

# Path to a local socket file the daemon will listen on.
# Default: disabled
LocalSocket /var/run/clamd.sock

# Remove stale socket after unclean shutdown.
# Default: disabled
FixStaleSocket

# TCP port address.
# Default: disabled
#TCPSocket 3310

# TCP address.
# By default we bind to INADDR_ANY, probably not wise.
# Enable the following to provide some degree of protection
# from the outside world.
# Default: disabled
#TCPAddr 127.0.0.1

# Maximum length the queue of pending connections may grow to.
# Default: 15
#MaxConnectionQueueLength 30

# Clamd uses FTP-like protocol to receive data from remote clients.
# If you are using clamav-milter to balance load between remote clamd daemons
# on firewall servers you may need to tune the options below.

# Close the connection when the data size limit is exceeded.
# The value should match your MTA's limit for a maximal attachment size.
# Default: 10M
#StreamMaxLength 20M

# Limit port range.
# Default: 1024
#StreamMinPort 30000
# Default: 2048
#StreamMaxPort 32000

# Maximal number of threads running at the same time.
# Default: 10
#MaxThreads 20

# Waiting for data from a client socket will timeout after this time (seconds).
# Value of 0 disables the timeout.
# Default: 120
#ReadTimeout 300

# Waiting for a new job will timeout after this time (seconds).
# Default: 30
#IdleTimeout 60

# Maximal depth directories are scanned at.
# Default: 15
#MaxDirectoryRecursion 20

# Follow directory symlinks.
# Default: disabled
#FollowDirectorySymlinks

# Follow regular file symlinks.
# Default: disabled
#FollowFileSymlinks

# Perform internal sanity check (database integrity and freshness).
# Default: 1800 (30 min)
#SelfCheck 600

# Execute a command when virus is found. In the command string %v will
# be replaced by a virus name.
# Default: disabled
#VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"

# Run as a selected user (clamd must be started by root).
# Default: disabled
#User clamav

# Initialize supplementary group access (clamd must be started by root).
# Default: disabled
#AllowSupplementaryGroups

# Stop daemon when libclamav reports out of memory condition.
#ExitOnOOM

# Don't fork into background.
# Default: disabled
#Foreground

# Enable debug messages in libclamav.
# Default: disabled
#Debug

# Do not remove temporary files (for debug purposes).
# Default: disabled
#LeaveTemporaryFiles


# By default clamd uses scan options recommended by libclamav. This option
# disables recommended options and allows you to enable selected ones below.
# DO NOT TOUCH IT unless you know what you are doing.
# Default: disabled
#DisableDefaultScanOptions

##
## Executable files
##

# PE stands for Portable Executable - it's an executable file format used
# in all 32-bit versions of Windows operating systems. This option allows
# ClamAV to perform a deeper analysis of executable files and it's also
# required for decompression of popular executable packers such as UPX, FSG,
# and Petite.
# Default: enabled
#ScanPE

# With this option clamav will try to detect broken executables and mark
# them as Broken.Executable
# Default: disabled
#DetectBrokenExecutables


##
## Documents
##

# This option enables scanning of Microsoft Office document macros.
# Default: enabled
#ScanOLE2

##
## Mail files
##

# Enable internal e-mail scanner.
# Default: enabled
#ScanMail

# If an email contains URLs ClamAV can download and scan them.
# WARNING: This option may open your system to a DoS attack.
# Never use it on loaded servers.
# Default: disabled
#MailFollowURLs

# Recursion level limit for the mail scanner.
# Default: 64
#MailMaxRecursion 128


##
## HTML
##

# Perform HTML normalisation and decryption of MS Script Encoder code.
# Default: enabled
#ScanHTML


##
## Archives
##

# ClamAV can scan within archives and compressed files.
# Default: enabled
#ScanArchive

# Due to license issues libclamav does not support RAR 3.0 archives (only the
# old 2.0 format is supported). Because some users report stability problems
# with unrarlib it's disabled by default and you must uncomment the directive
# below to enable RAR 2.0 support.
# Default: disabled
ScanRAR

# The options below protect your system against Denial of Service attacks
# using archive bombs.

# Files in archives larger than this limit won't be scanned.
# Value of 0 disables the limit.
# Default: 10M
#ArchiveMaxFileSize 15M

# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
# file, all files within it will also be scanned. This options specifies how
# deep the process should be continued.
# Value of 0 disables the limit.
# Default: 8
#ArchiveMaxRecursion 9

# Number of files to be scanned within an archive.
# Value of 0 disables the limit.
# Default: 1000
#ArchiveMaxFiles 1500

# If a file in an archive is compressed more than ArchiveMaxCompressionRatio
# times it will be marked as a virus (Oversized.ArchiveType, e.g. Oversized.Zip)
# Value of 0 disables the limit.
# Default: 250
#ArchiveMaxCompressionRatio 300

# Use slower but memory efficient decompression algorithm.
# only affects the bzip2 decompressor.
# Default: disabled
#ArchiveLimitMemoryUsage

# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
# Default: disabled
#ArchiveBlockEncrypted

# Mark archives as viruses (e.g. RAR.ExceededFileSize, Zip.ExceededFilesLimit)
# if ArchiveMaxFiles, ArchiveMaxFileSize, or ArchiveMaxRecursion limit is
# reached.
# Default: disabled
#ArchiveBlockMax


##
## Clamuko settings
## WARNING: This is experimental software. It is very likely it will hang
## up your system!!!
##

# Enable Clamuko. Dazuko (/dev/dazuko) must be configured and running.
# Default: disabled
#ClamukoScanOnAccess

# Set access mask for Clamuko.
# Default: disabled
#ClamukoScanOnOpen
#ClamukoScanOnClose
#ClamukoScanOnExec

# Set the include paths (all files in them will be scanned). You can have
# multiple ClamukoIncludePath directives but each directory must be added
# in a seperate line.
# Default: disabled
#ClamukoIncludePath /home
#ClamukoIncludePath /students

# Set the exclude paths. All subdirectories are also excluded.
# Default: disabled
#ClamukoExcludePath /home/guru

# Don't scan files larger than ClamukoMaxFileSize
# Value of 0 disables the limit.
# Default: 5M
#ClamukoMaxFileSize 10M
#StreamSaveToDisk

Вот и все ключи... :) это отсюда... http://www.markelov.net/articles.php?lng=ru&pg=44
Далее проверьте наличие в /usr/local/etc/clamav.conf ключей:


LocalSocket /var/run/clamd.sock
ScanMail
StreamSaveToDisk
и отсутствие ключа
Example
Software is like sex: It's better when it's free.
Спасибо сказали: