Skip to content
Smarter by Design.Simpler for Business

waf ​

The waf command branch manages the WAF configuration of a vService. It has four resources and these set up a nested structure: the settings belong to the service, the host groups to the settings, the rules to the group and the inspection parts to the rule.

Layers ​

LayerCommandWhat it defines
Service settingwaf optionsThe protection level, the blocking page, the blacklist, the body processing, the learning, the analysis, the report and the notifications
Host groupwaf host-groupsWith which WAF mode which hosts will be protected
Path rulewaf fw-rulesWith which methods, at what length and at what depth a request path can be
Inspection partwaf rule-partsThe key and value restrictions in a region of the rule

Every layer is bound to the one above it with an identifier: the groups are selected with poolId, the rules with poolId and hostGroupId, and the parts with poolId, hostGroupId and ruleId.

Command Map ​

CommandActions
waf optionsshow · update · update-many
waf host-groupslist · show · add · update · delete · update-many · add-arg-headers · reset-rules
waf fw-ruleslist · show · add · update · delete · add-arg-headers
waf rule-partslist · show · add · update · delete

The Writing of the Identity Fields ​

The identifier fields are required and are written with the field name and its value together; -- does not come before them.

TR7 WEB-CLI · layers
# 1) the WAF settings of the service
admin@TR7LBWAF01> waf options show poolId <vservice>
 
# 2) the host groups of that service
admin@TR7LBWAF01> waf host-groups list poolId <vservice>
 
# 3) the path rules of a group
admin@TR7LBWAF01> waf fw-rules list poolId <vservice> hostGroupId <group>
 
# 4) the inspection parts of a rule
admin@TR7LBWAF01> waf rule-parts list poolId <vservice> hostGroupId <group> ruleId <rule>
admin@TR7LBWAF01>  

WAF Modes ​

The mode of the host group determines what the rules will do to the matching request.

ModeWhat it does
blockingIt blocks the matching request — the default
monitorIt does not block, it only records
learningIt learns rules from the traffic

Running a new group in the monitor mode first makes it possible to see the wrong matches before passing to blocking.

Things to Know ​

  • Everything is bound to a vService. poolId is written in all four of the commands; the vService records are in the lb service command.
  • The rules do not have a name. The path rules are listed with the path they match and the inspection parts in the region: key form.
  • The factory set is set up from two commands. The ready header inspections are made with add-arg-headers and the returning of the rules to the factory with reset-rules; both of them are explained on the waf host-groups page.
  • Bulk update is present in two resources. The waf options and waf host-groups commands have update-many; the detail is in the bulk update section on the API Commands page.
  • The protection level determines the rule set. When the protection level in the waf options command changes, the tightness of the factory rule set changes as well.