Best Practices The Blue Coat ProxySG and ProxyAV Appliances.1
Best Practices The Blue Coat ProxySG and ProxyAV Appliances.1
Best Practices The Blue Coat ProxySG and ProxyAV Appliances.1
Technical Brief
420 North Mary Avenue Sunnyvale, CA 94085 www.bluecoat.com Send comments about this technical brief to
[email protected]
Copyright 1999-2008 Blue Coat Systems, Inc. All rights reserved worldwide. No part of this document may be reproduced by any means nor modified, decompiled, disassembled, published or distributed, in whole or in part, or translated to any electronic medium or other means without the written consent of Blue Coat Systems, Inc. All right, title and interest in and to the Software and documentation are and shall remain the exclusive property of Blue Coat Systems, Inc. and its licensors. ProxyAV, CacheOS, SGOS, SG, Spyware Interceptor, Scope, ProxyRA Connector, ProxyRA Manager, Remote Access and MACH5 are trademarks of Blue Coat Systems, Inc. and CacheFlow, Blue Coat, Accelerating The Internet, ProxySG, WinProxy, AccessNow, Ositis, Powering Internet Management, The Ultimate Internet Sharing Solution, Cerberian, Permeo, Permeo Technologies, Inc., and the Cerberian and Permeo logos are registered trademarks of Blue Coat Systems, Inc. All other trademarks contained in this document and in the Software are the property of their respective owners. BLUE COAT SYSTEMS, INC. DISCLAIMS ALL WARRANTIES, CONDITIONS OR OTHER TERMS, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, ON SOFTWARE AND DOCUMENTATION FURNISHED HEREUNDER INCLUDING WITHOUT LIMITATION THE WARRANTIES OF DESIGN, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL BLUE COAT SYSTEMS, INC., ITS SUPPLIERS OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, WHETHER ARISING IN TORT, CONTRACT OR ANY OTHER LEGAL THEORY EVEN IF BLUE COAT SYSTEMS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
ii
Contents
Chapter 1: About Technical Briefs
Overview...................................................................................................................................................... 5 Issue #1Very Large Data Streams or Slow Downloads ..................................................................... 5 About Intelligent Connection Traffic Monitoring (ICTM) .............................................................. 5 Solution A ............................................................................................................................................... 7 Solution B................................................................................................................................................ 9 Issue #2 - More Than Seventy Byte Ranges Within One Request........................................................ 9 Issue ......................................................................................................................................................... 9 Resolution ............................................................................................................................................... 9 Additional ICAP Policy Optimization Suggestions ............................................................................ 10 Aggressive Client Retries ................................................................................................................... 10 Avoid scanning virus pattern updates ............................................................................................. 10 Installing the CPL Described in This Document.................................................................................. 11
Appendix A: ProxySG and ProxyAV Configuration Interaction
Proceedable Errors .............................................................................................................................. 15 Unproceedable Errors ......................................................................................................................... 15 Errors Produced by the ProxySG ...................................................................................................... 15
iii
Technical Brief
iv
Overview
The integration of the ProxySG appliance with the ProxyAV appliance (or third-party ICAP scanner) enables network administrators to scan all Web traffic for viruses and malware. Anti-virus (AV) scanning can be achieved with minimal configuration; however, some client/server network behavior can impact the performance of the ProxySG/ProxyAV appliance solution, and can thus impact user satisfaction. These issues usually result in slowness, broken applications, and broken pages. If you encounter these issues, apply the policies provided below.
Note: For optimum performance and to minimize issues, the ProxySG and ProxyAV appliances must be on the same subnet and not separated by a router. Verify that the speed and duplex of the ProxyAV network interface and the connected switch port are configured the same.
Technical Brief
When ICTM is enabled, the ProxyAV checks for slow downloads. If the specified warning threshold is reached, the ProxyAV notifies the administrator of the dropped URLs (through an e-mail or SNMP trap, if the option is selected), which allows for the proxy administrator to create policy to ignore these URLs. If the critical threshold is reached, the ProxyAV terminates the oldest, slowest connections so that the level below the threshold is maintained. For information about configuring this feature, see Chapter 3 in the Blue Coat ProxyAV Configuration and Management Guide.
Note: If you are using a third-party anti-virus solution with the ProxySG or do not have the ICTM feature enabled, use one of the solutions in this section.
Issue
Attempting to virus scan this type of data can potentially consume significant time and AV appliance resources (potentially slowing other scans)until an error is returned. If allowed to continue, these transfers fail with one of the following ICAP X-Error-Codes:
Maximum file size exceeded Scan timeout
The default configuration of the ProxyAV triggers such errors only after the file size exceeds 100MB or after 800 seconds of delay. Such a delay is unacceptable for the time-sensitive data required by webcams and stock tickers. Some client applications automatically retry a request if no response is received in a certain amount of time. Also, users might attempt to refresh the request when a response is delayed. Refreshing the request can lead to a high number of queued requests for the same object, which increases the competition for ProxyAV scanning resources. When a client application is especially aggressive, it impacts all network traffic as the ProxySG waits for ProxyAV responses.
Resolution
To avoid these issues, implement one of the following policies. These example policies use different approaches and are not intended to co-exist. Select only one.
Note: If you are using a third-party antivirus software, Blue Coat recommends that you implement the CPL in Solution A.
Technical Brief
Solution A
To enhance user satisfaction and achieve maximum performance from the ProxyAV, some customers choose not to scan the data streams that are known to cause issues. One benefit of this policy is reduced load on the ProxyAV. The risk is that the exemption could potentially allow malicious content to slip viruses through unscanned. The following example policy is based on request/response patterns that indicate an overly large or slow download.
; -------------ICAP Best Practices---------------------------------------------;;; The actual ICAP respmod rule should already be defined, these actions will ;;; reset it back to (no) upon an attempt to scan a streaming object or an object ;;; that shouldn't be scanned <cache> delete_on_abandonment(yes) <cache> url.scheme=http condition=NOICAP response.icap_service(no) <Proxy> request.header.User-Agent="ProxyAV" patience_page(no) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This condition will match if the content length is greater than ;; 99,999,999 bytes, or no content length is provided. Both of ;; these are signs that this may tie up a thread on the AV for too long. define condition NO_or_LARGE_CONTENT_LENGTH response.header.Content-Length=!"" response.header.Content-Length=!"^[0-9]{1,8}$" end condition NO_or_LARGE_CONTENT_LENGTH ;; Here are some common infinite stream media types, these will ;; also block some threads on the AV. define condition MEDIA_MIME_TYPES response.header.Content-Type="video/" response.header.Content-Type="application/streamingmedia" response.header.Content-Type="application/x-streamingmedia" response.header.Content-Type="application/vnd.rn" response.header.Content-Type="application/ogg" response.header.Content-Type="application/x-ogg" response.header.Content-Type="audio/" response.header.Content-Type="multipart/x-mixed-replace" end condition MEDIA_MIME_TYPES ;; None of these exist right now define condition Missbehaving_Modern_UserAgents ; Add modern user-agents known to missbehave to this condition ; and remove the comment character (semicolon) before Rule 3 above. ;request.header.User-Agent="" end condition Missbehaving_Modern_UserAgents define condition VIDEO_AUDIO_with_NO_or_LARGE_CONTENT_LENGTH condition=NO_or_LARGE_CONTENT_LENGTH condition=MEDIA_MIME_TYPES end condition VIDEO_AUDIO_with_NO_or_LARGE_CONTENT_LENGTH
Instructor Edition Blue Coat Systems, Inc. Documentation and Education Services
Technical Brief
define condition UserAgents_with_NO_or_LARGE_CONTENT_LENGTH condition=NO_or_LARGE_CONTENT_LENGTH condition=Missbehaving_Modern_UserAgents end condition UserAgents_with_NO_or_LARGE_CONTENT_LENGTH define condition MissBehaving_Old_UserAgents request.header.User-Agent="Winamp" request.header.User-Agent="NSPlayer" request.header.User-Agent="RMA" request.header.User-Agent="ultravox" request.header.User-Agent="itunes" request.header.User-Agent="forest" request.header.User-Agent="Scottrader" request.header.User-Agent="SVN" end condition MissBehaving_Old_UserAgents define condition HTTPv0.9_UserAgents http.response.version=0.9 condition=MissBehaving_Old_UserAgents end condition HTTPv0.9_UserAgents define condition NOICAP condition=VIDEO_AUDIO_with_NO_or_LARGE_CONTENT_LENGTH condition=HTTPv0.9_UserAgents condition=UserAgents_with_NO_or_LARGE_CONTENT_LENGTH ; Yahoos stock ticker problem -15sep06 url.domain=//streamerapi.finance.yahoo.com url.domain=//stream.aol.com url.domain=//finance.google.com ; Other streaming media exceptions url.domain=//youtube.com url.domain=//pandora.com end condition NOICAP ; -------------End ICAP Best Practices-------------------------
Note:
When deciding the scan/no-scan/fail_open/fail_closed options, carefully consider the inherent security issues. See Appendix A: "ProxySG and ProxyAV Configuration Interaction" on page 13 and Appendix B: "ProxySG and ProxyAV Appliance Possible Errors" on page 15 for more information. Refer to "Installing the CPL Described in This Document" on page 11 for instructions on installing this CPL.
Technical Brief
Solution B
Some administrators choose to wait for one of the symptomatic errors (Maximum file size exceeded or Scan timeout) to occur and then serve the data stream unscanned. This approach ensures that all data is still sent to the ProxyAVthus, the maximum amount of scanning can occur. The downside to this approach is that all requests for infinite data-streams must reach the maximum file size or scan timeout configured on the ProxyAV. If a sufficient number of concurrent requests for such data streams occur, the request queue will slow or delay other traffic. The following policy example serves the data stream if the error is Maximum file size exceeded or Scan timeout. Other errors are denied.
<cache> response.icap_service(<resp_service>, fail_open) <proxy> condition=!maxfilesizeexceeded_or_scantimeout_errors exception(icap_error) define condition maxfilesizeexceeded_or_scantimeout_errors icap_error_code=max_file_size_exceeded icap_error_code=scan_timeout end condition maxfilesizeexceeded_or_scantimeout_errors
Refer to "Installing the CPL Described in This Document" on page 11 for instructions on installing this CPL.
Issue
The ProxyAV supports up to seventy byte ranges per request. For requests with fewer than seventy byte ranges, the object data is retrieved from the origin server and scanned normally. If the entire object is already in the cache, each byte range is extracted and served from the cached data. However, if a request has more than seventy byte ranges, the ProxySG is unable to serve the data from the cache and instead must retrieve the data from the origin server and rescan it. Some Acrobat plug-ins fail to handle the patience-page behavior of the proxy during these 70+ byte-range retrievals and, instead, display a blank screen. Such Acrobat plug-ins operate correctly for all other requests, even with regard to patience-page operation.
Instructor Edition Blue Coat Systems, Inc. Documentation and Education Services
Technical Brief
Resolution
Normally, this issue can be resolved by upgrading the Acrobat plug-in. However, if an upgrade is not possible, or the particular PDF files continue to trigger this behavior, you can selectively disable the patience-page behavior to mitigate the issue. The following example policy disables the patience-page behavior for PDF objects from Blue Coat sites:
<proxy> url.domain=bluecoat.com url.extension=(pdf) patience_page(no)
Although all data is still scanned, use this type of policy only as needed. The lack of patience-page prompts often causes users to reload a page prematurely, which can result in user dissatisfaction and redundant scanning of the same data.
10
Technical Brief
Download the text file for the desired CPL. Download the "Solution A" CPL at:
http://techlabs.bluecoat.com/policy/icap_noscan.txt 2. 3. 4. 5. 6. 7. 8. Download the "Solution B" CPL at: http://techlabs.bluecoat.com/policy/icap_scan.txt Save the file to your desktop or other convenient location. Modify the policy to meet your requirements. Using the ProxySG Management Console, select Configuration > Policy > Policy Files. From the Install Local File from drop-down menu, select Text Editor, and then click Install. The Edit and Install the Local Policy File page displays. Open the CPL file you downloaded and copy the text. Return to the Edit and Install the Local Policy File page and paste the contents of the file at the end of the local policy file on your ProxySG. Click Install. A dialog displays, informing you whether the installation was successful. If necessary, correct any errors in the file and re-install it.
Instructor Edition Blue Coat Systems, Inc. Documentation and Education Services
11
Technical Brief
12
13
Technical Brief
14
During an ICAP transaction, three types of errors can occur: Proceedable errorsThese are ProxyAV-detected errors that can block or serve depending on the AV appliance configuration. UnProceedable errorsThese errors always result in a ProxyAV-generated block. Errors generated by the ProxySGThese errors are related to a failure in the communication to the AV appliance and obey the fail_open and fail_closed configuration only.
Proceedable Errors
The ProxyAV proceedable errors are:
Scan timeout Decode error Password protected Insufficient space Maximum file size exceeded Maximum total size exceeded Maximum total files exceeded Internal error
When a proceedable error occurs, the ProxyAV can either block or serve. A ProxyAV block means that an ICAP 500 error is returned to the ProxySG appliance. A ProxyAV serve means that an ICAP 200 or 204 is returned to the ProxySG, along with an X-Error-Code header.
Unproceedable Errors
The ProxyAV unproceedable errors always return an ICAP 500 error, making them equivalent to the block behavior. These errors are:
File extension blocked Antivirus load failure Antivirus license expired Antivirus engine error
15
Technical Brief
Following these errors, the ProxySG fail_open and fail_closed configuration fully controls the behavior with regard to data or error served.
16