Responder action and policy examples
Example: Blocking Access from Specified IPs
-
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
-
In the navigation pane, expand Responder, and then click Actions.
-
In the details pane, click Add.
-
In the Create Responder Action dialog box, do the following:
-
In the Name text box, type act_unauthorized.
-
Under Type, select Respond with.
-
In the Target text area, type the following string: "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
-
Click Create, and then click Close. The responder action you configured, named act_unauthorized, now appears in the Responder Actions page.
-
-
In the navigation pane, click Policies.
-
In the details pane, click Add.
-
In the Create Responder Policy dialog box, do the following:
-
In the Name text box, type pol_unauthorized.
-
Under Action, select act_unauthorized.
-
In the Expression window, type the following rule: CLIENT.IP.SRC.IN_SUBNET(222.222.0.0/16)
-
Click Create, then click Close. The responder policy you configured, named pol_unauthorized, now appears in the Responder Policies page.
-
-
Globally bind your new policy, pol_unauthorized, as described in Binding a Responder Policy.
Example: Redirecting a client to a new 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>\""
add responder policy pol_redirect "CLIENT.IP.SRC.IN_SUBNET(222.222.0.0/16)" act_redirect
-
Navigate to AppExpert > Responder > Actions.
-
In the details pane, click Add.
-
In the Create Responder Action dialog box, do the following:
-
In the Name text box, type act_redirect.
-
Under Type, select Redirect.
-
Click Create, then click Close. The responder action you configured, named act_redirect, now appears in the Responder Actions page.
-
-
In the navigation pane, click Policies.
-
In the details pane, click Add.
-
In the Create Responder Policy dialog box, do the following:
-
In the Name text box, type pol_redirect.
-
Under Action, select act_redirect.
-
In the Expression window, type the following rule: CLIENT.IP.SRC.IN_SUBNET(222.222.0.0/16)
-
Click Create, then click Close. The responder policy you configured, named pol_redirect, now appears in the Responder Policies page.
-
-
Globally bind your new policy, pol_redirect, as described in Binding a Responder Policy.