レスポンダーのアクションとポリシーの例
例:指定された IP からのアクセスのブロック
-
add responder action act_unauthorized respond with "HTTP/1.1 403 Forbidden\r\n\r\n" + "Client: " + CLIENT.IP.SRC + " is not authorized to access URL:" + "HTTP.REQ.URL.HTTP_URL_SAFE"'
-
add responder policy pol_un "CLIENT.IP.SRC.IN_SUBNET (222.222.0.0/16)" act_unauthorized
-
bind responder global pol_un 10
-
ナビゲーションウィンドウで \[ レスポンダー\] を展開し、\[ アクション\] をクリックします。
-
詳細ペインで、[Add] をクリックします。
-
\[ レスポンダーアクションの作成 \] ダイアログボックスで、次の操作を行います。
-
\[ 名前 \] テキストボックスに act_unauthorized と入力します。
-
\[種類\] で、\[返信方法\] を選択します。
-
\[ターゲット\] テキスト領域に、次の文字列を入力します。「HTTP/1.1 403 禁止された\ r\ n\ r\ n」+「クライアント:" + CLIENT.IP.SRC + "は URL にアクセスする権限がありません:」+ HTTP.REQ.URL.HTTP_URL_SAFE
-
[Create] をクリックしてから、[Close] をクリックします。 構成した act_unauthorized という名前のレスポンダーアクションが \[ レスポンダーアクション \] ページに表示されます。
-
-
ナビゲーションペインで、\[ Policies\] をクリックします。
-
詳細ペインで、[Add] をクリックします。
-
\[ レスポンダーポリシーの作成 \] ダイアログボックスで、次の操作を行います。
-
\[名前\] テキストボックスに pol_unauthorized と入力します。
-
\[ アクション\] で \[act_unauthorized\] を選択します。
-
\[ 式 \] ウィンドウで、次のルールを入力します。CLIENT.IP.SRC.IN_SUBNET (222.222.0.0/16)
-
\[ 作成\] をクリックし、\[ 閉じる\] をクリックします。 構成した pol_unauthorized という名前のレスポンダーポリシーが \[レスポンダーポリシー\] ページに表示されます。
-
例:クライアントを新しい URL にリダイレクトする
-
add responder action act_redirect redirect
"http://www.example.com/404.html" -
show responder action act_redirect
-
add responder policy pol_redirect "CLIENT.IP.SRC.IN_SUBNET(222.222.0.0/16)" act_redirect
-
show responder policy pol_redirect
-
bind responder global pol_redirect 10
> add responder action act_redirect redirect `" http ://www.example.com/404.html "`
Done
> add responder policy pol_redirect "CLIENT.IP.SRC.IN_SUBNET(222.222.0.0/16)" act_redirect
Done
-
AppExpert > レスポンダー > アクションに移動します。
-
詳細ペインで、[Add] をクリックします。
-
\[ レスポンダーアクションの作成 \] ダイアログボックスで、次の操作を行います。
-
\[ 名前 \] テキストボックスに act_redirect と入力します。
-
\[タイプ\] で \[ リダイレクト\] を選択します
-
\[ ターゲット \] テキスト領域に、次の文字列を入力します。
"http://www.example.com/404.html" -
\[ 作成\] をクリックし、\[ 閉じる\] をクリックします。 act_redirect という名前のレスポンダーアクションが \[ レスポンダーアクション \] ページに表示されます。
-
-
ナビゲーションペインで、\[ Policies\] をクリックします。
-
詳細ペインで、[Add] をクリックします。
-
\[ レスポンダーポリシーの作成 \] ダイアログボックスで、次の操作を行います。
-
\[ 名前 \] テキストボックスに pol_redirect と入力します。
-
\[ アクション\] で \[act_redirect\] を選択します。
-
\[ 式 \] ウィンドウで、次のルールを入力します。CLIENT.IP.SRC.IN_SUBNET (222.222.0.0/16)
-
\[ 作成\] をクリックし、\[ 閉じる\] をクリックします。 構成した pol_redirect という名前のレスポンダーポリシーが \[レスポンダーポリシー\] ページに表示されます。
-