Deny URL check

The Deny URL check examines and blocks connections to URLs that are commonly accessed by hackers and malicious code. This check contains a list of URLs that are common targets of hackers or malicious code and that rarely if ever appear in legitimate requests. You can also add URLs or URL patterns to the list. The Deny URL check prevents attacks against various security weaknesses known to exist in web server software or on many websites.

The Deny URL check takes priority over the Start URL check, and thus denies malicious connection attempts even when a Start URL relaxation would normally allow a request to proceed.

In the Modify Deny URL Check dialog box, on the General tab you can enable or disable the Block, Log, and Statistics actions.

If you use the command-line interface, you can enter the following command to configure the Deny URL Check:

set appfw profile <name> -denyURLAction [**block**] [**log**] [**stats**] [**none**]

You can create and configure your own deny URLs only in the NetScaler GUI.

  1. Navigate to Security > NetScaler Web App Firewall > Profiles.
  2. Select a profile for which you want to add a deny URL and click Edit.
  3. In the NetScaler Web App Firewall Profile page, select Relaxation Rules from the Advanced Settings section.
  4. Select Deny URL and click Edit.
  5. In the Deny URL Rules page, click Add.
  6. Specify the following details and click Create.

    • Deny URL - A regular expression to define a deny URL.
    • Comments - Description for the expression.
    • Resource ID - Unique ID to identify the deny URL rule.

    Deny URL expression

  7. Click Close.
  8. In the NetScaler Web App Firewall Profile page, click Done.

Following are examples of Deny URL expressions:

  • Do not allow users to access the image server at directly:

  • Do not allow users to access CGI (.cgi) or PERL (.pl) scripts directly:

  • Here is the same deny URL, modified to support non-ASCII characters:



Regular expressions are powerful. Especially if you are not thoroughly familiar with PCRE-format regular expressions, double-check any regular expressions you write. Make sure that they define exactly the URL or pattern that you want to block, and nothing else. Careless use of wildcards, and especially of the dot-asterisk (.*) metacharacter/wildcard combination, can have results that you do not want, such as blocking access to web content that you did not intend to block.

Deny URL check

In this article