Third-party rules can be uploaded to the LoadMaster. You can also write your own custom rules, which can be uploaded. These rules must be in the ModSecurity rule format in order to upload correctly. The Custom Rules screen enables you to upload WAF Custom Rules (.conf) and associated WAF Custom Rule Data (.data or .txt) files. The first character in the filename must be an alpha character or an underscore (_). The other characters in the filename can include full stops (.) or dashes (-). You can also upload gzip-compressed Tarball files (.tar.gz), which contain multiple rule and data files.

Note: We do not recommend using the WAF rule "redirect" action in custom rules because of the impact this has on system performance. You should use content rules instead for that purpose.

To upload rule and data files, follow the steps below:

  1. In the main menu, select Web Application Firewall > Custom Rules.

  2. To upload custom rules; in the Installed Rules section, click Choose File.

    Individual rules can be uploaded as .conf files. Alternatively, you can load a package of rules in a .tar.gz file.

  3. Browse to and select the rule file(s) to be uploaded.
  4. Click Add Ruleset.
  5. To upload any additional data files, in the WAF Custom Rule Data section, click Choose File.

    The additional files are for the rules’ associated data files. If you uploaded a Tarball in the Browse to and select the rule file(s) to be uploaded. step, the rules and data files can be packaged together.

  6. Browse to and select the additional data files to be uploaded.
  7. Click Add Data File.

The rules are now available to assign within the Virtual Services modify screen. Refer to the next section to determine how to configure the Virtual Service to use the installed rules.

Delete/Download a Custom Rule or Data File

Custom rules and data files can be deleted or downloaded by clicking the relevant buttons.

Note: If a rule is assigned to a Virtual Service, it will not be available for deletion.