{"id":1773,"date":"2015-11-09T00:01:41","date_gmt":"2015-11-08T15:01:41","guid":{"rendered":"http:\/\/www.magtranetwork.com\/?p=1773"},"modified":"2015-11-13T16:31:55","modified_gmt":"2015-11-13T07:31:55","slug":"aws_ec2_proxy_squid_clamav","status":"publish","type":"post","link":"https:\/\/www.magtranetwork.com\/aws\/aws_ec2_proxy_squid_clamav.html","title":{"rendered":"AWS EC2 Amazon Linux\u3067\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0(Squid & Clamav)\u3092\u69cb\u7bc9\u3057\u3001SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0(\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0)\u3067\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u3092\u3059\u308b"},"content":{"rendered":"

AWS\u306eEC2\u30b5\u30fc\u30d3\u30b9\u304c\u767b\u5834\u3057\u305f\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u500b\u4eba\u3067\u7c21\u5358\u306b\u81ea\u7531\u306b\u64cd\u4f5c\u3067\u304d\u308b\u30b5\u30fc\u30d0\u74b0\u5883\u3092\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306b\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n

EC2\u30b5\u30fc\u30d3\u30b9\u3067\u5b9f\u73fe\u3067\u304d\u308b\u30b7\u30b9\u30c6\u30e0\u306f\u5c71\u306e\u3088\u3046\u306b\u3042\u308a\u307e\u3059\u304c\u3001\u500b\u4eba\u4f7f\u7528\u3092\u60f3\u5b9a\u3059\u308b\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56\u306e\u4e00\u8cab\u3068\u3057\u3066\u5c0e\u5165\u3057\u3066\u304a\u304d\u305f\u3044\u306e\u304c\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3067\u3059\u3002<\/p>\n

AWS\u306eEC2\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308c\u3070\u30b5\u30fc\u30d0\u74b0\u5883\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u305f\u3081\u3001\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3082\u7c21\u5358\u306b\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u4eca\u56de\u306fAWS EC2 Amazon Linux\u4e0a\u306b\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8Clamav\u3068\u9023\u643a\u3057\u305f\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092Squid\u3067\u69cb\u7bc9\u3059\u308b\u3053\u3068\u3067\u3001\u7121\u6599\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u7bc4\u56f2\u5185\u3067\u30bb\u30ad\u30e5\u30a2\u306a\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3092\u5099\u5fd8\u9332\u3068\u3057\u3066\u8a18\u8f09\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n

AWS EC2 Amazon Linux\u3067\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0(Squid & Clamav)\u3092\u69cb\u7bc9\u3057\u3001SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0(\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0)\u3067\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u3092\u3059\u308b<\/h2>\n

AWS EC2 Amazon Linux\u3067\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0(Squid)\u3092\u69cb\u7bc9\u3059\u308b<\/h3>\n

squid\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a<\/h4>\n

squid\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# yum install -y squid\r\n<\/pre>\n

squid\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002[EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eElasticIP]\u306e\u90e8\u5206\u306f\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306b\u3059\u308bAmazon Linux\u306eElastic IP\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n

\r\n[root@localhost ~]# vim \/etc\/squid\/squid.conf\r\n#\r\n# Recommended minimum configuration:\r\n#\r\nacl manager proto cache_object\r\nacl localhost src 127.0.0.1\/32 ::1\r\nacl to_localhost dst 127.0.0.0\/8 0.0.0.0\/32 ::1\r\n\r\n# Example rule allowing access from your local networks.\r\n# Adapt to list your (internal) IP networks from where browsing\r\n# should be allowed\r\nacl localnet src 10.0.0.0\/8\t# RFC1918 possible internal network\r\nacl localnet src 172.16.0.0\/12\t# RFC1918 possible internal network\r\nacl localnet src 192.168.0.0\/16\t# RFC1918 possible internal network\r\nacl localnet src fc00::\/7       # RFC 4193 local private network range\r\nacl localnet src fe80::\/10      # RFC 4291 link-local (directly plugged) machines\r\n\r\nacl SSL_ports port 443\r\nacl Safe_ports port 22\r\nacl Safe_ports port 80\t\t# http\r\nacl Safe_ports port 21\t\t# ftp\r\nacl Safe_ports port 443\t\t# https\r\nacl Safe_ports port 70\t\t# gopher\r\nacl Safe_ports port 210\t\t# wais\r\nacl Safe_ports port 1025-65535\t# unregistered ports\r\nacl Safe_ports port 280\t\t# http-mgmt\r\nacl Safe_ports port 488\t\t# gss-http\r\nacl Safe_ports port 591\t\t# filemaker\r\nacl Safe_ports port 777\t\t# multiling http\r\nacl CONNECT method CONNECT\r\n\r\nacl source src [EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eElasticIP]\/32\r\n\r\n#\r\n# Recommended minimum Access Permission configuration:\r\n#\r\n# Only allow cachemgr access from localhost\r\nhttp_access allow manager localhost\r\nhttp_access deny manager\r\n\r\n# Deny requests to certain unsafe ports\r\nhttp_access deny !Safe_ports\r\n\r\n# Deny CONNECT to other than secure SSL ports\r\nhttp_access deny CONNECT !SSL_ports\r\n\r\n# We strongly recommend the following be uncommented to protect innocent\r\n# web applications running on the proxy server who think the only\r\n# one who can access services on "localhost" is a local user\r\n#http_access deny to_localhost\r\n\r\n#\r\n# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS\r\n#\r\n\r\n# Example rule allowing access from your local networks.\r\n# Adapt localnet in the ACL section to list your (internal) IP networks\r\n# from where browsing should be allowed\r\nhttp_access allow localnet\r\nhttp_access allow localhost\r\nhttp_access allow source\r\n\r\n# And finally deny all other access to this proxy\r\nhttp_access deny all\r\n\r\n# Squid normally listens to port 3128\r\nhttp_port 3128\r\n\r\n# We recommend you to use at least the following line.\r\nhierarchy_stoplist cgi-bin ?\r\n\r\n# Uncomment and adjust the following to add a disk cache directory.\r\n#cache_dir ufs \/var\/spool\/squid 100 16 256\r\n\r\n# Leave coredumps in the first cache dir\r\ncoredump_dir \/var\/spool\/squid\r\n\r\n# Add any of your own refresh_pattern entries above these.\r\nrefresh_pattern ^ftp:\t\t1440\t20%\t10080\r\nrefresh_pattern ^gopher:\t1440\t0%\t1440\r\nrefresh_pattern -i (\/cgi-bin\/|\\?) 0\t0%\t0\r\nrefresh_pattern .\t\t0\t20%\t4320\r\n\r\nforwarded_for off\r\nvisible_hostname unknown\r\nrequest_header_access X-Forwarded-For deny all\r\nrequest_header_access Via deny all\r\nrequest_header_access Cache-Control deny all\r\n\r\n#icap_enable on\r\n#icap_send_client_ip on\r\n#icap_send_client_username on\r\n#icap_client_username_header X-Authenticated-User\r\n#icap_service service_req reqmod_precache bypass=1 icap:\/\/127.0.0.1:1344\/squidclamav\r\n#adaptation_access service_req allow all\r\n#icap_service service_resp respmod_precache bypass=1 icap:\/\/127.0.0.1:1344\/squidclamav\r\n#adaptation_access service_resp allow all\r\n\r\nmax_filedesc 4096\r\n\r\n<\/pre>\n

squid\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u3057\u3001\u30b5\u30fc\u30d0\u8d77\u52d5\u6642\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# \/etc\/init.d\/squid start\r\n[root@localhost ~]# chkconfig --add squid\r\n<\/pre>\n

\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0squid\u306e\u307f\u3067\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u3068\u3057\u3066Clamav\u3092\u9023\u643a\u3055\u305b\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u3053\u3053\u307e\u3067\u3067Amazon Linux\u306e\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u69cb\u7bc9\u306f\u7d42\u4e86\u3067\u3059\u3002<\/p>\n

AWS EC2 Amazon Linux\u3067\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8(Clamav)\u3092\u5c0e\u5165\u3057\u3001\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0(Squid)\u3068\u9023\u643a\u3059\u308b<\/h3>\n

\u5fc5\u8981\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068freshclam\u306e\u8a2d\u5b9a<\/h4>\n

\u7d9a\u3044\u3066\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0squid\u3068\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8Clamav\u3092\u9023\u643a\u3055\u305b\u308b\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002
\n\u5fc5\u8981\u30e2\u30b8\u30e5\u30fc\u30eb\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# yum install -y gcc make clamav clamav-update clamd\r\n<\/pre>\n

clamav-update\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u5c0e\u5165\u3055\u308c\u308b\u30a6\u30a4\u30eb\u30b9\u30d1\u30bf\u30fc\u30f3\u66f4\u65b0\u30b3\u30de\u30f3\u30c9freshclam\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# vim \/etc\/freshclam.conf\r\nDatabaseDirectory \/var\/lib\/clamav\r\n\r\nUpdateLogFile \/var\/log\/freshclam.log\r\n\r\nLogSyslog yes\r\n\r\nDatabaseOwner clamupdate\r\n\r\nDatabaseMirror database.clamav.net\r\n\r\n<\/pre>\n

\u30a6\u30a4\u30eb\u30b9\u30d1\u30bf\u30fc\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u66f4\u65b0\u3057\u307e\u3059\u3002
\n\u30a6\u30a4\u30eb\u30b9\u30d1\u30bf\u30fc\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u6700\u65b0\u306b\u4fdd\u3064\u305f\u3081\u306b\u306ffreshclam\u30b3\u30de\u30f3\u30c9\u3092cron\u306a\u3069\u3067\u5b9a\u671f\u7684\u306b\u5b9f\u884c\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# freshclam\r\n<\/pre>\n

clamd\u306e\u8a2d\u5b9a<\/h4>\n

clamd\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# vim \/etc\/clamd.d\/scan.conf\r\nLogSyslog yes\r\nLocalSocket \/var\/run\/clamd.scan\/clamd.sock\r\nFixStaleSocket yes\r\nTCPAddr 127.0.0.1\r\nUser clamscan\r\nAllowSupplementaryGroups yes\r\n<\/pre>\n

clamd\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u3057\u3001\u30b5\u30fc\u30d0\u8d77\u52d5\u6642\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# \/etc\/init.d\/clamd.scan start\r\n[root@localhost ~]# chkconfig --add clamd.scan\r\n<\/pre>\n

c_icap\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a<\/h4>\n

c_icap\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# curl -L -O https:\/\/sourceforge.net\/projects\/c-icap\/files\/c-icap\/0.4.x\/c_icap-0.4.2.tar.gz\r\n[root@localhost ~]# tar zxvf c_icap-0.4.2.tar.gz\r\n[root@localhost ~]# cd c_icap-0.4.2\r\n[root@localhost c_icap-0.4.2]# .\/configure\r\n[root@localhost c_icap-0.4.2]# make\r\n[root@localhost c_icap-0.4.2]# make install\r\n[root@localhost c_icap-0.4.2]# cp \/usr\/local\/etc\/c-icap.conf \/etc\/\r\n<\/pre>\n

c_icap\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# vim \/etc\/c-icap.conf\r\n\r\n#161\u884c\u76ee\u3042\u305f\u308a\uff1a\u30b5\u30fc\u30d0\u7ba1\u7406\u8005\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5909\u66f4\r\nServerAdmin you@your.address\r\n\r\n#170\u884c\u76ee\u3042\u305f\u308a\uff1a\u30b5\u30fc\u30d0\u540d\u306e\u5909\u66f4\r\nServerName YourServerName\r\n\r\n#568\u884c\u76ee\u3042\u305f\u308a\uff1asquidclamav\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8ffd\u52a0\r\nService squidclamav squidclamav.so\r\n<\/pre>\n

c_icap\u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]#  vim \/etc\/init.d\/c-icap\r\n#!\/bin\/bash\r\n\r\n# c-icap: Start\/Stop c-icap\r\n# chkconfig: - 70 30\r\n# description: c-icap is an implementation of an ICAP server.\r\n# processname: c-icap\r\n# pidfile: \/var\/run\/c-icap\/c-icap.pid\r\n\r\n. \/etc\/rc.d\/init.d\/functions\r\n. \/etc\/sysconfig\/network\r\n\r\nCONFIG_FILE=\/etc\/c-icap.conf\r\nPID_DIR=\/var\/run\/c-icap\r\n\r\nRETVAL=0\r\nstart() {\r\n   echo -n $"Starting c-icap: "\r\n   daemon \/usr\/local\/bin\/c-icap -f $CONFIG_FILE\r\n   RETVAL=$?\r\n   echo\r\n   [ $RETVAL -eq 0 ] && touch \/var\/lock\/subsys\/c-icap\r\n   return $RETVAL\r\n}\r\nstop() {\r\n   echo -n $"Stopping c-icap: "\r\n   killproc c-icap\r\n   rm -f \/var\/run\/c-icap\/c-icap.ctl\r\n   RETVAL=$?\r\n   echo\r\n   [ $RETVAL -eq 0 ] && rm -f $PID_DIR\/c-icap.pid \/var\/lock\/subsys\/c-icap\r\n   return $RETVAL\r\n}\r\ncase "$1" in\r\n   start)\r\n      start\r\n   ;;\r\n   stop)\r\n      stop\r\n   ;;\r\n   status)\r\n      status c-icap\r\n   ;;\r\n   restart)\r\n      stop\r\n      start\r\n   ;;\r\n   *)\r\n      echo $"Usage: $0 {start|stop|status|restart}"\r\n   exit 1\r\nesac\r\nexit $?\r\n<\/pre>\n

c_icap\u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5b9f\u884c\u6a29\u9650\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# chmod 755 \/etc\/rc.d\/init.d\/c-icap\r\n<\/pre>\n

squidclamav\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a<\/h4>\n

squidclamav\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# curl -L -O https:\/\/sourceforge.net\/projects\/squidclamav\/files\/squidclamav\/6.14\/squidclamav-6.14.tar.gz\r\n[root@localhost ~]# tar zxvf squidclamav-6.14.tar.gz\r\n[root@localhost ~]# cd squidclamav-6.14\r\n[root@localhost squidclamav-6.14]# .\/configure --with-c-icap\r\n[root@localhost squidclamav-6.14]# make\r\n[root@localhost squidclamav-6.14]# make install\r\n<\/pre>\n

c_icap\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# ln -s \/usr\/local\/etc\/squidclamav.conf \/etc\/squidclamav.conf \r\n[root@localhost ~]# vim \/etc\/squidclamav.conf\r\n\r\n#18\u884c\u76ee\u3042\u305f\u308a\uff1a\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u3067\u30a6\u30a4\u30eb\u30b9\u304c\u691c\u51fa\u3055\u308c\u305f\u5834\u5408\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5148\r\nredirect https:\/\/[WEB\u30b5\u30fc\u30d0\u30a2\u30c9\u30ec\u30b9]\/your_path\/error.html\r\n\r\n#27\u884c\u76ee\u3042\u305f\u308a\uff1aclamd\u306e\u8a2d\u5b9a\u3001\u3064\u307e\u308a\/etc\/clamd.d\/scan.conf\u306ePidFile\u306e\u51fa\u529b\u5148\u306b\u5408\u308f\u305b\u308b\u3002\r\nclamd_local \/var\/run\/clamd.scan\/clamd.sock\r\n\r\n<\/pre>\n

c-icap\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u3057\u3001\u30b5\u30fc\u30d0\u8d77\u52d5\u6642\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# \/etc\/init.d\/c-icap start\r\n[root@localhost ~]# chkconfig --add c-icap \r\n<\/pre>\n

squid\u3092clamav\u3068\u9023\u643a\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a<\/h4>\n

squid\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092squidclamav\u7d4c\u7531\u3067clamav\u3068\u9023\u643a\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# vi \/etc\/squid\/squid.conf\r\n#\u6700\u7d42\u884c\u306b\u8ffd\u8a18\u307e\u305f\u306f\u8a72\u5f53\u90e8\u5206\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u89e3\u9664\r\nicap_enable on\r\nicap_send_client_ip on\r\nicap_send_client_username on\r\nicap_client_username_header X-Authenticated-User\r\nicap_service service_req reqmod_precache bypass=1 icap:\/\/127.0.0.1:1344\/squidclamav\r\nadaptation_access service_req allow all\r\nicap_service service_resp respmod_precache bypass=1 icap:\/\/127.0.0.1:1344\/squidclamav\r\nadaptation_access service_resp allow all\r\n<\/pre>\n

squid\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n

\r\n[root@localhost ~]# \/etc\/init.d\/squid restart\r\n<\/pre>\n

\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0squid\u3068\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8Clamav\u3092\u9023\u643a\u3055\u305b\u308b\u8a2d\u5b9a\u306f\u3053\u3053\u307e\u3067\u3067\u3059\u3002<\/p>\n

SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0(\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0)\u3067\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u3092\u3059\u308b<\/h3>\n

\u7d9a\u3044\u3066\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0squid\u3068\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8Clamav\u3092\u9023\u643a\u3055\u305b\u308b\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u5b9f\u969b\u306b\u30ed\u30fc\u30ab\u30eb\u304b\u3089SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0(\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0)\u3067Amazon Linux\u306e\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u305f\u30dd\u30fc\u30c8\u7d4c\u7531\u3067\u30d7\u30ed\u30ad\u30b7\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n

\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092\u4f7f\u7528\u3059\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304cMac OSX\u307e\u305f\u306fLinux\u306e\u5834\u5408\u306b\u304a\u3051\u308bSSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u65b9\u6cd5<\/h4>\n

SSH\u306eCompressionLevel\u306f\u901a\u4fe1\u306e\u5727\u7e2e\u7387\u30920\u301c9\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5727\u7e2e\u7387\u306b\u3088\u3063\u3066\u82e5\u5e72\u901a\u4fe1\u901f\u5ea6\u304c\u5909\u5316\u3059\u308b\u306e\u3067\u81ea\u5206\u306e\u74b0\u5883\u3067\u901f\u3044\u3068\u601d\u308f\u308c\u308b\u3082\u306e\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n

\r\nssh -C -o CompressionLevel=9 -L [\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u4f7f\u7528\u3059\u308b\u30ed\u30fc\u30ab\u30eb\u30dd\u30fc\u30c8]:127.0.0.1:3128 ec2-user@[EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eElasticIP] -i ~\/.ssh\/your_key.pem\r\n<\/pre>\n

(\u4f8b)<\/p>\n

\r\nssh -C -o CompressionLevel=9 -L 13128:127.0.0.1:3128 ec2-user@54.1.2.3 -i ~\/.ssh\/your_key.pem\r\n<\/pre>\n

\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u3092\u4f7f\u7528\u3059\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304cWindows\u306e\u5834\u5408\u306b\u304a\u3051\u308bSSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u65b9\u6cd5<\/h4>\n

TeraTerm\u306eSSH\u8ee2\u9001\u3092\u4f7f\u7528\u3057\u305f\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n

TeraTerm\u3092\u8d77\u52d5\uff1e\u8a2d\u5b9a\uff1eSSH\u8ee2\u9001\uff1e\u8ffd\u52a0 \u306e\u9806\u756a\u3067\u9805\u76ee\u3092\u9078\u629e\u3057\u3001\u300cSSH\u30dd\u30fc\u30c8\u8ee2\u9001\u300d\u753b\u9762\u307e\u3067\u9032\u307f\u307e\u3059\u3002
\n\u30ed\u30fc\u30ab\u30eb\u30dd\u30fc\u30c8\uff1a[\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u4f7f\u7528\u3059\u308b\u30dd\u30fc\u30c8]
\n\u30ea\u30c3\u30b9\u30f3\uff1a(\u7a7a\u767d\u306e\u307e\u307e)
\n\u30ea\u30e2\u30fc\u30c8\u5074\u30db\u30b9\u30c8\uff1a[EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eElasticIP]
\n\u30dd\u30fc\u30c8\uff1a3128<\/p>\n

(\u4f8b)
\n\u30ed\u30fc\u30ab\u30eb\u30dd\u30fc\u30c8\uff1a13128
\n\u30ea\u30c3\u30b9\u30f3\uff1a(\u7a7a\u767d\u306e\u307e\u307e)
\n\u30ea\u30e2\u30fc\u30c8\u5074\u30db\u30b9\u30c8\uff1a54.1.2.3
\n\u30dd\u30fc\u30c8\uff1a3128<\/p>\n

\u30d6\u30e9\u30a6\u30b6\u306e\u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a\u3068\u30a6\u30a4\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u30c6\u30b9\u30c8<\/h4>\n

\u4e0a\u8a18\u306eSSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u65b9\u6cd5\u306e\u4f8b\u3067\u8a2d\u5b9a\u3057\u305f\u30ed\u30fc\u30ab\u30eb\u30dd\u30fc\u30c8\u3067\u3042\u308c\u3070\u3001\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u306eHTTP\u30d7\u30ed\u30ad\u30b7\u60c5\u5831\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5165\u529b\u3059\u308c\u3070Amazon Linux\u306e\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u3067\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002
\n\u30db\u30b9\u30c8\u540d: 127.0.0.1
\n\u30dd\u30fc\u30c8\uff1a13128<\/p>\n

\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u30a6\u30a4\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u52d5\u4f5c\u78ba\u8a8d\u306f\u4e0b\u8a18\u30da\u30fc\u30b8\u306b\u9077\u79fb\u3057\u3001\u30c6\u30b9\u30c8\u30a6\u30a4\u30eb\u30b9\u304c\u5b58\u5728\u3059\u308b\u30da\u30fc\u30b8\u300ceicar.com\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u8a2d\u5b9a\u3057\u305f\u300c\u30d7\u30ed\u30ad\u30b7\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u3067\u30a6\u30a4\u30eb\u30b9\u304c\u691c\u51fa\u3055\u308c\u305f\u5834\u5408\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5148\u300d\u306b\u9077\u79fb\u3059\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002
\nhttps:\/\/eicar.org\/85-0-Download.html<\/p>\n","protected":false},"excerpt":{"rendered":"

AWS\u306eEC2\u30b5\u30fc\u30d3\u30b9\u304c\u767b\u5834\u3057\u305f\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u500b\u4eba\u3067\u7c21\u5358\u306b\u81ea\u7531\u306b\u64cd\u4f5c\u3067\u304d\u308b\u30b5\u30fc\u30d0\u74b0\u5883\u3092\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306b\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 EC2\u30b5\u30fc\u30d3\u30b9\u3067\u5b9f\u73fe\u3067\u304d\u308b\u30b7\u30b9\u30c6\u30e0\u306f\u5c71\u306e\u3088\u3046\u306b\u3042\u308a\u307e\u3059\u304c\u3001\u500b\u4eba\u4f7f\u7528\u3092\u60f3\u5b9a\u3059\u308b\u3068\u30bb\u30ad\u30e5 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3,22],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/1773"}],"collection":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/comments?post=1773"}],"version-history":[{"count":5,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/1773\/revisions"}],"predecessor-version":[{"id":1813,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/1773\/revisions\/1813"}],"wp:attachment":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/media?parent=1773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/categories?post=1773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/tags?post=1773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}