{"id":168,"date":"2009-06-02T02:21:54","date_gmt":"2009-06-01T17:21:54","guid":{"rendered":"http:\/\/www.mozilla.gr.jp\/~shimono\/blog\/?p=168"},"modified":"2009-06-02T02:23:24","modified_gmt":"2009-06-01T17:23:24","slug":"clamav%e3%82%92squid%e3%81%a7%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.himor.in\/?p=168","title":{"rendered":"ClamAV\u3092squid\u3067\u5229\u7528\u3059\u308b"},"content":{"rendered":"<p>\u30a6\u30a7\u30d6\u306e\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092\u901a\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306b\u3001\u3067\u304d\u308c\u3070\u5b89\u5168\u306b\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30a6\u30a4\u30eb\u30b9\u30c1\u30a7\u30c3\u30ab\u30fc\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u5229\u7528\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u306fDebian lenny\u3067squid3\u306a\u306e\u3067\u3001ClamAV\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u306b\u3057\u3066\u3001<a href=\"http:\/\/sourceforge.net\/projects\/squidclamav\/\">squidclamav<\/a>\u3067\u4e8c\u3064\u306e\u9593\u3092\u3064\u306a\u3050\u3053\u3068\u306b\u3002<\/p>\n<blockquote><p>aptitude install clamav clamav-freshclam clamav-daemon<br \/>\naptitude install libcurl4-openssl-dev<\/p><\/blockquote>\n<p>clamav-data\u3067\u306f\u306a\u304fclamav-freshclam\u3092\u3068\u308a\u3042\u3048\u305a\u9078\u629e\u3057\u305f\u304c\u3001-data\u306e\u65b9\u304c\u3088\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u3068\u306f\u3044\u3048\u3001\u3069\u3061\u3089\u3067\u3082\u6b63\u5e38\u306b\u52d5\u3051\u3070\u305f\u3044\u3057\u3066\u5909\u308f\u308a\u306f\u306a\u3044\u3001\u306f\u305a\u3002\u4e0b\u306e\u307b\u3046\u306fsquidclamav\u306emake\u306b\u5fc5\u8981\u306a\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3002<\/p>\n<p>squildclamav\u306e.tar.gz (\u73fe\u6642\u70b9\u3067\u306f4.0) \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u9069\u5f53\u306b\/usr\/local\/src\u306a\u3069\u3067\u5c55\u958b\u3001.\/configure; make; make install \u3059\u308b\u3002\u3053\u306e\u6642\u70b9\u3067\u3001<\/p>\n<blockquote><p>\/usr\/local\/bin\/squidclamav (\u5b9f\u884c\u30d0\u30a4\u30ca\u30ea)<br \/>\n\/etc\/squidclamav.conf.dist (\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u96db\u5f62)<\/p><\/blockquote>\n<p>\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u7d42\u308f\u308c\u3070\u5f8c\u306f\u8a2d\u5b9a\u3002<\/p>\n<p>ClamAV\u3092\u3069\u3046\u3084\u3063\u3066\u3064\u306a\u3050\u304b\u306b\u3088\u308b\u304c\u3001\u4eca\u56de\u306funix socket\u3092\u9078\u629e\u3057\u305f\u306e\u3067\u3001<\/p>\n<blockquote><p>dpkg-reconfigure clamav-base<\/p><\/blockquote>\n<p>\u3092\u5b9f\u884c\u3057\u3066tcp\u3067\u306a\u304f\u3066unix\u3092\u9078\u629e\u3057\u3066\u304a\u304f\u3002squid\u306e\u8a2d\u5b9a\u5909\u66f4\u306f\u3001<\/p>\n<blockquote><p>http_access deny to_localhost<br \/>\nurl_rewrite_program \/usr\/local\/bin\/squidclamav<br \/>\nurl_rewrite_children 15<br \/>\nurl_rewrite_access deny localhost<\/p><\/blockquote>\n<p>\u3042\u305f\u308a\u3002clamav.conf\u306f\u7279\u306b\u306f\u5909\u3048\u306a\u3044\u304c\u3001LocalSocket\u306e\u5024\u306f\u5f8c\u3067\u5fc5\u8981\u3002squidclamav.conf\u306f\u3001\uff5e.dist\u304b\u3089\u30b3\u30d4\u30fc\u3057\u3066\u9069\u5b9c\u66f8\u304d\u63db\u3048\u308b\u3002\u3068\u308a\u3042\u3048\u305a\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<blockquote><p>$ grep -v ^# squidclamav.conf<br \/>\nsquid_ip 127.0.0.1<br \/>\nsquid_port 3128<br \/>\nlogfile \/var\/log\/squidclamav.log<br \/>\nredirect http:\/\/&lt;domain&gt;\/clwarn.cgi<br \/>\ndebug 0<br \/>\nforce 1<br \/>\nstat 1<br \/>\nmaxredir 15<br \/>\nclamd_local \/var\/run\/clamav\/clamd.ctl<br \/>\ntimeout 60<br \/>\nuseragent Mozilla\/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)<br \/>\ntrust_cache 0<\/p>\n<p>content ^.*\\\/.*$<\/p><\/blockquote>\n<p>\u3053\u3053\u3067\u306eredirect\u306e\u8a2d\u5b9a\u5148\u306f\u3001\u30a8\u30e9\u30fc\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u8fd4\u3059\u3068\u304d\u306eCGI\u306a\u306e\u3067\u3001\u9069\u5f53\u306b\u4f55\u3067\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u4e00\u5fdc\u30bd\u30fc\u30b9\u306eclwarn.cgi\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u305f\u3002(+Apache\u306e\u8a2d\u5b9a\u3082\u5fc5\u8981)<\/p>\n<p>\u3042\u3068\u306f\u5fc5\u8981\u306a\u3089logrotate.d\u306e\u4e0b\u306bsquidclamav.log\u306e\u305f\u3081\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u8ffd\u52a0\u3068\u304b\u306f\u3042\u308b\u3051\u308c\u3069\u3001\u5927\u4f53\u3053\u308c\u3067\u52d5\u304f\u3002\u306f\u305a\u3002<\/p>\n<p>\u65e5\u672c\u8a9e\u5316\u306b\u95a2\u3057\u3066\u306f\u3001\u5358\u7d14\u306bclwarn.cgi\u3060\u3051\u306e\u8a71\u306a\u306e\u3067\u3001\u3069\u3046\u305b\u691c\u51fa\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u898b\u3066\u306a\u306b\u304b\u3059\u308b\u3053\u3068\u306f\u3042\u308b\u307e\u3044\u3068\u601d\u3063\u3066\u653e\u7f6e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a6\u30a7\u30d6\u306e\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092\u901a\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306b\u3001\u3067\u304d\u308c\u3070\u5b89\u5168\u306b\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30a6\u30a4\u30eb\u30b9\u30c1\u30a7\u30c3\u30ab\u30fc\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002 \u5229\u7528\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u306fDebian lenny\u3067squid3\u306a\u306e\u3067\u3001ClamAV\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u306b\u3057\u3066\u3001squidclamav\u3067\u4e8c\u3064\u306e\u9593\u3092\u3064\u306a\u3050\u3053\u3068\u306b\u3002 aptitude install clamav clamav-freshclam clamav-daemon aptitude install libcurl4-openssl-dev clamav-data\u3067\u306f\u306a\u304fclamav-freshclam\u3092\u3068\u308a\u3042\u3048\u305a\u9078\u629e\u3057\u305f\u304c\u3001-data\u306e\u65b9\u304c\u3088\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u3068\u306f\u3044\u3048\u3001\u3069\u3061\u3089\u3067\u3082\u6b63\u5e38\u306b\u52d5\u3051\u3070\u305f\u3044\u3057\u3066\u5909\u308f\u308a\u306f\u306a\u3044\u3001\u306f\u305a\u3002\u4e0b\u306e\u307b\u3046\u306fsquidclamav\u306emake\u306b\u5fc5\u8981\u306a\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3002 squildclamav\u306e.tar.gz (\u73fe\u6642\u70b9\u3067\u306f4.0) \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u9069\u5f53\u306b\/usr\/local\/src\u306a\u3069\u3067\u5c55\u958b\u3001.\/configure; make; make install \u3059\u308b\u3002\u3053\u306e\u6642\u70b9\u3067\u3001 \/usr\/local\/bin\/squidclamav (\u5b9f\u884c\u30d0\u30a4\u30ca\u30ea) \/etc\/squidclamav.conf.dist (\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u96db\u5f62) \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3002 \u3053\u3053\u307e\u3067\u7d42\u308f\u308c\u3070\u5f8c\u306f\u8a2d\u5b9a\u3002 ClamAV\u3092\u3069\u3046\u3084\u3063\u3066\u3064\u306a\u3050\u304b\u306b\u3088\u308b\u304c\u3001\u4eca\u56de\u306funix socket\u3092\u9078\u629e\u3057\u305f\u306e\u3067\u3001 dpkg-reconfigure clamav-base \u3092\u5b9f\u884c\u3057\u3066tcp\u3067\u306a\u304f\u3066unix\u3092\u9078\u629e\u3057\u3066\u304a\u304f\u3002squid\u306e\u8a2d\u5b9a\u5909\u66f4\u306f\u3001 http_access deny to_localhost url_rewrite_program \/usr\/local\/bin\/squidclamav url_rewrite_children 15 url_rewrite_access deny localhost \u3042\u305f\u308a\u3002clamav.conf\u306f\u7279\u306b\u306f\u5909\u3048\u306a\u3044\u304c\u3001LocalSocket\u306e\u5024\u306f\u5f8c\u3067\u5fc5\u8981\u3002squidclamav.conf\u306f\u3001\uff5e.dist\u304b\u3089\u30b3\u30d4\u30fc\u3057\u3066\u9069\u5b9c\u66f8\u304d\u63db\u3048\u308b\u3002\u3068\u308a\u3042\u3048\u305a\u306f\u3053\u3093\u306a\u611f\u3058\u3002 $ grep -v ^# squidclamav.conf squid_ip 127.0.0.1 squid_port 3128 logfile \/var\/log\/squidclamav.log redirect http:\/\/&lt;domain&gt;\/clwarn.cgi debug [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,4,14],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/posts\/168"}],"collection":[{"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.himor.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=168"}],"version-history":[{"count":2,"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":170,"href":"https:\/\/blog.himor.in\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions\/170"}],"wp:attachment":[{"href":"https:\/\/blog.himor.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.himor.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.himor.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}