BitNinja rate limiting

You are here:
Estimated reading time: 1 min
In this article

With the 2.29.0 version of BitNinja, we introduced the rate limiting feature. This is based on the WAF and SSLTerminating modules. In order to use this feature make sure that the WAF module is enabled and working on the domains, you wish to protect with this feature.

You can set a limit for the all-over number of connections per domain within the defined time period.
The time period can be set with the perDomainRateLimitInterval variable.

If the rate limit is exceeded users get an error message saying that there are too many requests with the status code 429.

See our guide on how to enable the WAF module here.
And check out this guide to make sure the module is working properly.
The feature is available from version 2.29.0. Please check out this guide if you need help with updating BitNinja.

If you need help with the configuration or the module does not seem to be working do not hesitate to contact us.
You can reach us via live chat or send us a ticket from your dashboard, or send us an email at info@bitninja.io

Configuration

We need to edit the SSLTerminating module’s config file.

Please see a step-by-step video guide here and a text guide below.

  1. Open the /etc/bitninja/SslTerminating/config.ini file with your preferred text editor.
    e.g.: nano /etc/bitninja/SslTerminating/config.ini
  2. Locate the [domainratelimit] flag in the file.
    e.g.: in nano, you can use ctrl+w to search
  1. Remove the semicolon from the “; perDomainRateLimit = 0” and ; “;perDomainRateLimitInterval = 0” lines.
  2. Change the rate limit according to your best knowledge. Make sure
  3. Save the changes and exit the editor.
    e.g.: in nano use ctrl+x and then press y and then enter
  4. Reload the SSLTerminating module with this command:
    bitninjacli --module=SslTerminating --reload
If the perDomainRateLimit is set to 0 then the rate limiting feature is disabled.
Make sure to add a non-zero value to the perDomainRateLimitInterval variable.
Views: 243