Rules
You can check for an existing root ruleset from the dashboard or via the Account rulesets API. If you are a new Magic Transit customer, you may not have a root ruleset created for your account. To view examples for root rulesets, review the Magic Firewall Terraform documentation.
By default, you can create a maximum of 100 rules. We recommend you create lists of IP addresses to reference within rules to streamline rule management.
Add a rule
- Log in to your Cloudflare dashboard, and select your account.
- Select Magic Firewall.
- In the Custom rules tab, select Add a Rule.
- Fill out the information for your new rule.
- When you are done, select Add new rule.
Create a disabled rule
When you add a new rule, the rule is Enabled by default.
To create a Disabled rule, follow the steps in Add a rule above and toggle Enabled to off. When a rule is in the disabled state, the rule will not perform the action until is set to Enabled.
To disable an existing rule, from the Magic Firewall Rules page, set the Enabled toggle to off.
Update a rule
- Log in to your Cloudflare dashboard, and select your account.
- Select Magic Firewall > Custom rules.
- Locate the rule you want to edit, and select Edit.
- Update the rule with your changes and select Edit rule.
Delete an existing rule
- Locate the rule you want to delete in the list.
- From the end of the row, select Delete.
- Select Delete again to confirm the deletion.