1.7. i-FILTERにてHTTP/HTTPS判別するための設定(Local Traffic Policyの設定)

 i-FILTER ICAP版は、ICAPのリクエストヘッダの一部でHTTPサーバへの通信かHTTPSサーバへの通信かを判別しています。i-FILTERがHTTP/HTTPS判別可能となるようにLocal Traffic Policyにてルールを作成します。同時にi-FILTEはICAPレスポンスはチェックしないので、ICAPレスポンスチェックを無効にします。また、i-FILTERによるURL Filteringチェック後に、リクエストヘッダを元の値に戻すためのLocal Traffic Policyルールも作成します。こちらのルールでは実際にICAP通信は行わないので、ICAP通信を無効にします。

  1. Local Traffic >> Policies >> Policies List にて、Create ボタンを押します。

    ../../_images/mod7-1.png

  2. 任意のポリシー名 を入力し、Create Policy ボタンを押します。

    ../../_images/mod7-2.png

  3. HTTPS用のルールを作成します。Rulesの Create ボタンを押します。

    ../../_images/mod7-3.png

  4. 任意のRule名 を入力し、Match all of the following conditions: マークをクリックし、以下のように入力します。

    ../../_images/mod7-4.png

    Match all of the following conditions: 必要有無
    TCP port is any of 443 at client accepted time. 必須
    Apply to traffic on local side of external interface 必須

  5. 同様に、Do the following when the traffic is matched: マークをクリックし、以下のように入力し、Save ボタンを押します。(デバック用のログルールは任意で追加します。)

    ../../_images/mod7-5.png

    Do the following when the traffic is matched: 必要有無
    Insert HTTP Header named urihttps with value tcl:[HTTP::uri] at request time. 必須
    Replace HTTP URI full string with value tcl:https://[HTTP::host][HTTP::uri] at request time. 必須
    Disable response adapt at response time. 必須
    Log message tcl: HTTPs(443) URI was replaced to: [HTTP::uri] at request time. 任意
    Facility: local0 Priority: info 任意

  6. 同様にHTTP用のルールを作成します。

    ../../_images/mod7-6.png

    Match all of the following conditions: 必要有無
    TCP port is any of 80 at client accepted time. 必須
    Apply to traffic on local side of external interface 必須
    Do the following when the traffic is matched: 必要有無
    Insert HTTP Header named urihttp with value tcl:[HTTP::uri]** at **request time. 必須
    Replace HTTP URI full string with value tcl:http://[HTTP::host][HTTP::uri] at request time. 必須
    Disable response adapt at response time. 必須
    Log message tcl: HTTP(80) URI was replaced to: [HTTP::uri] at request time. 任意
    Facility: local0 Priority: info 任意

  7. 2つのルール作成後は、以下のようになります。Save Draft ボタンを押します。

    ../../_images/mod7-7.png

  8. Publish ボタンを押すと、以下のようになります。

    ../../_images/mod7-8.png

  9. 上記手順と同様に、以下のようなリクエストヘッダをもとに戻すLocal Traffic Policyルールを作成します。

    ../../_images/mod7-9.png

    Match all of the following conditions: 必要有無
    TCP port is any of 443 at client accepted time. 必須
    Apply to traffic on local side of external interface 必須
    Do the following when the traffic is matched: 必要有無
    Replace HTTP URI full string with value tcl:[HTTP::header values urihttps] at request time. 必須
    Remove HTTP Header named urihttps at request time. 必須
    Disable request adapt at request time. 必須
    Disable response adapt at response time. 必須
    Match all of the following conditions: 必要有無
    TCP port is any of 80 at client accepted time. 必須
    Apply to traffic on local side of external interface 必須
    Do the following when the traffic is matched: 必要有無
    Replace HTTP URI full string with value tcl:[HTTP::header values urihttp] at request time. 必須
    Remove HTTP Header named urihttp at request time. 必須
    Disable request adapt at request time. 必須
    Disable response adapt at response time. 必須