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: 必要有無 TCP
port
is
any of
443
atclient accepted
time.必須 Apply to traffic on local
side ofexternal
interface必須 同様に、Do the following when the traffic is matched: の + マークをクリックし、以下のように入力し、Save ボタンを押します。(デバック用のログルールは任意で追加します。)
Do the following when the traffic is matched: 必要有無 Insert
HTTP Header
namedurihttps
with valuetcl:[HTTP::uri]
atrequest
time.必須 Replace
HTTP URI
full string
with valuetcl:https://[HTTP::host][HTTP::uri]
atrequest
time.必須 Disable
response adapt
atresponse
time.必須 Log message
tcl: HTTPs(443) URI was replaced to: [HTTP::uri]
atrequest
time.任意 Facility: local0
Priority:info
任意 同様にHTTP用のルールを作成します。
Match all of the following conditions: 必要有無 TCP
port
is
any of
80
atclient accepted
time.必須 Apply to traffic on local
side ofexternal
interface必須 Do the following when the traffic is matched: 必要有無 Insert
HTTP Header
namedurihttp
with valuetcl:[HTTP::uri]** at **request
time.必須 Replace
HTTP URI
full string
with valuetcl:http://[HTTP::host][HTTP::uri]
atrequest
time.必須 Disable
response adapt
atresponse
time.必須 Log
messagetcl: HTTP(80) URI was replaced to: [HTTP::uri]
atrequest
time.任意 Facility: local0
Priority:info
任意 2つのルール作成後は、以下のようになります。Save Draft ボタンを押します。
Publish ボタンを押すと、以下のようになります。
上記手順と同様に、以下のようなリクエストヘッダをもとに戻すLocal Traffic Policyルールを作成します。
Match all of the following conditions: 必要有無 TCP
port
is
any of
443
atclient accepted
time.必須 Apply to traffic on local
side ofexternal
interface必須 Do the following when the traffic is matched: 必要有無 Replace
HTTP URI
full string
with valuetcl:[HTTP::header values urihttps]
atrequest
time.必須 Remove
HTTP Header
namedurihttps
atrequest
time.必須 Disable
request adapt
atrequest
time.必須 Disable
response adapt
atresponse
time.必須 Match all of the following conditions: 必要有無 TCP
port
is
any of
80
atclient accepted
time.必須 Apply to traffic on local
side ofexternal
interface必須 Do the following when the traffic is matched: 必要有無 Replace
HTTP URI
full string
with valuetcl:[HTTP::header values urihttp]
atrequest
time.必須 Remove
HTTP Header
namedurihttp
atrequest
time.必須 Disable
request adapt
atrequest
time.必須 Disable
response adapt
atresponse
time.必須