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通信を無効にします。
Local Traffic >> Policies >> Policies List にて、Create ボタンを押します。
任意のポリシー名 を入力し、Create Policy ボタンを押します。
HTTPS用のルールを作成します。Rulesの Create ボタンを押します。
任意のRule名 を入力し、Match all of the following conditions: の + マークをクリックし、以下のように入力します。
Match all of the following conditions: 必要有無 TCPportisany of443atclient acceptedtime.必須 Apply to traffic on localside ofexternalinterface必須 同様に、Do the following when the traffic is matched: の + マークをクリックし、以下のように入力し、Save ボタンを押します。(デバック用のログルールは任意で追加します。)
Do the following when the traffic is matched: 必要有無 InsertHTTP Headernamedurihttpswith valuetcl:[HTTP::uri]atrequesttime.必須 ReplaceHTTP URIfull stringwith valuetcl:https://[HTTP::host][HTTP::uri]atrequesttime.必須 Disableresponse adaptatresponsetime.必須 Log messagetcl: HTTPs(443) URI was replaced to: [HTTP::uri]atrequesttime.任意 Facility: local0Priority:info任意 同様にHTTP用のルールを作成します。
Match all of the following conditions: 必要有無 TCPportisany of80atclient acceptedtime.必須 Apply to traffic on localside ofexternalinterface必須 Do the following when the traffic is matched: 必要有無 InsertHTTP Headernamedurihttpwith valuetcl:[HTTP::uri]** at **requesttime.必須 ReplaceHTTP URIfull stringwith valuetcl:http://[HTTP::host][HTTP::uri]atrequesttime.必須 Disableresponse adaptatresponsetime.必須 Logmessagetcl: HTTP(80) URI was replaced to: [HTTP::uri]atrequesttime.任意 Facility: local0Priority:info任意 2つのルール作成後は、以下のようになります。Save Draft ボタンを押します。
Publish ボタンを押すと、以下のようになります。
上記手順と同様に、以下のようなリクエストヘッダをもとに戻すLocal Traffic Policyルールを作成します。
Match all of the following conditions: 必要有無 TCPportisany of443atclient acceptedtime.必須 Apply to traffic on localside ofexternalinterface必須 Do the following when the traffic is matched: 必要有無 ReplaceHTTP URIfull stringwith valuetcl:[HTTP::header values urihttps]atrequesttime.必須 RemoveHTTP Headernamedurihttpsatrequesttime.必須 Disablerequest adaptatrequesttime.必須 Disableresponse adaptatresponsetime.必須 Match all of the following conditions: 必要有無 TCPportisany of80atclient acceptedtime.必須 Apply to traffic on localside ofexternalinterface必須 Do the following when the traffic is matched: 必要有無 ReplaceHTTP URIfull stringwith valuetcl:[HTTP::header values urihttp]atrequesttime.必須 RemoveHTTP Headernamedurihttpatrequesttime.必須 Disablerequest adaptatrequesttime.必須 Disableresponse adaptatresponsetime.必須