Accessible for the Developer and Business plan users only.
In the Rules subpage you can create and modify the firewall rules and attach them to certain applications.
A firewall rule can block or whitelist requests based on patterns. They can be assigned to sites directly or attached to a module.
To create a custom rule, click on the + Create Rule button.
A new page opens up with a firewall rule creation form (see the image below).
Adding a simple rule:
- Give your rule a name
- To the next field (If the IP address matches...) you can type an IP address, CIDR notation, or wildcards. For example:
- Next field is another condition - if the requesting URL contains - there you can type any URL pattern (e.g. contact-form/submit)
- In the last field you can choose, what action to take if your web app visitor matches all the rules you just set. Your options are to
- When you choose "Redirect", a new field opens up, where you can type, which URL the visitor will be redirected to
- Having filled the fields, click Create Rule
Finally, you should see your created rule on the Rules page.
If you want this rule to take effect, you need to attach it to your apps. To do that:
- Navigate to Rules tab
- Click on "Action" and "Attach Apps"
- A popup appears with the list of all your apps
- Toggle the button to attach your rule. You can attach as many apps as you wish
- Close the popup
Now you need to sync your sites. To do that:
- Click on "Resync Apps" at the top right corner
- From the popup you can click "Resync All" so all your apps will be updated
You have now successfully created a firewall rule and attached it to your site!
In the next article let's take a look at Firewall Modules. A firewall module is a group of custom firewall rules, which can be applied to your apps, all at once.
Updated 7 months ago