If I delete a host group, what happens to its rules?
Short answer
When a host group is deleted, all the page types, the Any Paths rule and the field inspections belonging to that group are also deleted permanently; the delete operation has no undo step of its own (deleting a host group). If there is a Backup & Restore backup taken before the deletion, the rules of the group can be brought back from this backup: Export WAF Rules in the preview of the backup downloads the rule set of the group as JSON, and the group is created again and the file is loaded with Import on the Page Types screen. Apply Backup File also brings the group back, but it returns the entire configuration of the device to the moment the backup was taken. From then on, requests that come to the patterns of the deleted group fall into the default group or into another group whose patterns match this Host value, and are inspected in the mode of that group, with the rules of that group; the rules of the deleted group are not transferred to any group. If the rules are to be preserved, a JSON file is taken with Export on the Page Types screen of the group before the deletion; the file is later loaded with Import on the Page Types screen of another group. Editing the name, mode or patterns of the group does not touch the page types; only deletion removes the rules. The default group cannot be deleted. Deletion is done with Delete in the list opened with the Edit link of the Virtual Host Groups band on the WAF Management tab, or with the waf host-groups delete command in WEB-CLI, and is recorded in User Logs.
How Does It Work?
| Deleted or affected | Result |
|---|---|
| The page types, the Any Paths rule and the field inspections of the group | Deleted permanently |
| Requests that come to the patterns of the group | Fall into the default group or into another group that matches this Host value; inspected with the mode and the rules of that group (Which host group does a request fall into; what if it matches none?) |
| The rules of the default group or of the other groups | Do not change; the rules of the deleted group are not transferred |
| Past traffic in the learning record | Not deleted; in later analyses, the rows are written to the group that matches at that moment |
| Settings across the vService (protection level, Checks, blacklist, blocking page) | Do not change |
| Way back | An Export file taken before the deletion, or a file taken from a device backup with Export WAF Rules; the group is created again and the file is loaded with Import (Restoring from a Backup) |
Before the deletion, the mode of the default group is taken into account: if the default group is in Learning mode, the domain name that the deleted group protected in Blocking mode is now processed in the learning mode without being blocked.
A name, mode or pattern change in the Edit window of the group does not touch the rules; to move a domain name to another group, editing the patterns is enough.
Deletion Steps
In the Left Monitor Panel → WAF-Protected vServices → vService → WAF Management tab, the N page types row under the mode card of the group to be deleted is clicked.
Export on the toolbar is clicked; all the page types, the Any Paths rule and the field inspections of the group are downloaded as a single JSON file (export steps). The file carries the vService and group name together with a date-time stamp.
The Edit link of the Virtual Host Groups band at the very bottom of the WAF Management tab is clicked; the Virtual Host Groups list opens (listing screen).
The row of the group to be deleted is selected and Delete on the toolbar is clicked. Right-clicking the row and selecting Delete deletes only that row (right-click menu). If the selection includes the default group, Delete does not become enabled (Can the default host group be deleted?).
The Are you sure that you want to delete virtual host groups object? question is confirmed; if more than one group is selected, the question states the number of the selection in the form Are you sure you want to delete 2 virtual host groups objects?. The WAF configuration is automatically produced again and applied. In a cluster setup, with the default auto-sync, the change is also sent to the peer device; if Manual Sync Mode is on, it is sent with Synchronize.
In WEB-CLI, the ID of the group is read from the waf host-groups list poolId <vService> output and the group is deleted with the following command (command summary):
waf host-groups delete poolId <vService> <group-id>Verification: the mode card of the group disappears from the WAF Management screen, the number of groups in the summary of the band decreases and the WAF host group "<name>" is deleted from <vService> record appears on the User Logs screen.
Restoring from a Backup
A Backup & Restore backup contains the entire configuration of the device, including the WAF rules. If there is a backup taken before the group was deleted, the rules of the group are brought back in two ways:
| Way | What comes back | Effect |
|---|---|---|
| Export WAF Rules + Import from the backup | Only the page types, the Any Paths rule and the field inspections of the selected group | The rest of the device does not change |
| Apply Backup File | The group and its rules | The entire configuration of the device (including the device users) returns to the moment the backup was taken; all the changes made after the backup are lost (restore) |
Viewing the backup and downloading the rules with Export WAF Rules require monitoring permission in the Settings area, loading the rules into the group with Import requires modify permission in the WAF area, and Apply Backup File requires modify permission in the Settings area. For the rules of the group only, the first way is followed:
The Configuration Menu is opened with the TR7 logo at the bottom left; Settings → Backup & Restore is selected.
In the list, the row of the backup taken before the group was deleted is clicked; the preview of the backup opens on the right (preview of the selected backup file).
Export WAF Rules is selected from the menu on the right of the preview title (or from the right-click menu of the row).
In the Export WAF Rules window that opens, the vService field comes with All selected by default; with this selection, the rules of all the groups of all the vServices are downloaded as a single zip file. For the rules of a single group, the vService the group is in is selected in the vService field, and the deleted host group in the Host Group Name field.
Accept is clicked; the rule set of the group is downloaded as a JSON file.
The name, mode and patterns of the group are not in the rule file; the group is added again with the same information from the Virtual Host Groups band on the WAF Management tab (How is a Host Group added; what goes into the Virtual Host Patterns field?).
The N page types row on the mode card of the new group is clicked; with Import on the toolbar, the file downloaded in step 5 is selected.
The Are you sure? question is confirmed. Import replaces the rule set of the group entirely with the one in the file.
The default backup plan (Classic (Daily)) takes a backup once a day; the rules of a group created and deleted on the same day may not be in the backup. Plans that also take a backup after configuration changes (Smart (Recommended), Strict, Custom) are selected from the Backup Plan field.
Common Misconceptions
- "The rules of the deleted group are moved to the default group." The rules are deleted; the requests are inspected with the default group's own rules.
- "Changing the mode or the pattern of the group resets the rules." Editing does not touch the rules; only deletion removes them.
- "Restoring from a backup brings back only the deleted group." Apply Backup File returns the entire configuration of the device to the moment the backup was taken; for the rules of the group only, Export WAF Rules from the backup and Import are used.
- "The Export Table icon of the table backs up the rules." Export Table gives only the visible columns as Excel, CSV or PDF and cannot be loaded back with Import; for a backup, Export on the Page Types toolbar is used.
How it is done in the documentation
