In the Rules subpage you can create and modify the firewall rules and attach them to certain sites.
A firewall rule can block or whitelist requests based on patterns. They can be assigned to sites directly or attached to a module.

14001400

Creating a Rule

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).

900900

Adding a simple rule:

  1. Give your rule a name
  2. To the next field (If the IP address matches...) you can type an IP address, CIDR notation, or wildcards. For example:
    • 127.0.0.1
    • 127.0.0.1/24
    • 127.0.0.*
  3. Next field is another condition - if the requesting URL contains - there you can type any URL pattern (e.g. contact-form/submit)
  4. In the last field you can choose, what action to take if your site visitor matches all the rules you just set. Your options are to
    • Block
    • Redirect
    • Log
    • Whitelist
  5. When you choose "Redirect", a new field opens up, where you can type, which URL the visitor will be redirected to
  6. Having filled the fields, click Create Rule

Finally, you should see your created rule on the Rules page.

14001400

Attaching the rule to your site

If you want this rule to take effect, you need to attach it to your sites. To do that:

  1. Click on "Action" and "Attach Sites"
  2. A popup appears with the list of all your sites
  3. Toggle the button to attach your rule. You can attach as many sites as you wish
  4. Close the popup
17761776

Now you need to sync your sites. To do that:

  1. Click on "Resync Sites" at the top right corner
  2. From the popup you can click "Resync All" so all your sites 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 sites.


Did this page help you?