The responder module on the NetScaler can be used to generate respones based on some attribute of the incoming connection. The responder module is only available with NetScaler 8.0 (or later). This defines the prcocedure to create a 404 Not Found response based on the URL of the incoming request.
Summary
The responder module can generate a response directly from the NetScaler based on some attribute of the client. In this example the responder is used to create an action called "404NotFound" and this action will be applied any incoming connections that are requesting the "/restricted" page. The "/restricted" page should only be accessed by adminstrative staff from the private internal subnet. The following example demonstrates the creation of the "404NotFound" action, the creation of the policy that identifies any requests for the "/restricted" page, and identifies if the connection request is from the internal private subnet 192.168.1.0/24 and if it is allows access to the "/restricted" page. Finally the binding of the policy to the global override policy bank. All through the CLI, the same procedure can be done through the GUI as well.
1. Enable the feature
2. Create the responder action 404NotFound to return a 404 Not found page
3. Create the responder policy 404Policy to identify connection requests for /restricted from the internal private subnet 192.168.1.0/24 and allowing access and denying access to all other connections requesting that page.
4. Bind the responder policy to the global override policy bank.
Code Snippet
From the CLI:
1. NS> enable ns feature responder
Done
2. NS> add responder action 404NotFound respondwith '"HTTP/1.1 404 NOT FOUND\r\n"'
Done
3. NS> add responder policy 404Policy "CLIENT.IP.SRC.IN_SUBNET(192.168.1.0/24).NOT && HTTP.REQ.URL.CONTAINS(\"/restricted\")" 404NotFound
Done
4. NS> bind responder global 404Policy 10 -type OVERRIDE
Done
More Information