Blacklist / whitelist an IP from the API

Modified on Tue, 5 Dec, 2023 at 4:46 PM

It is possible to blacklist / whitelister an IP address from the API or the dashboard.


From the dashboard


On the Fasterize configuration screen, in « My applications », click on the « WAF » application.


On the « WAF » application, you can add a new access rule to whitelist or blacklist a list of IP addresses.


To add an access rule, click on « New acces rule »

You need to define a label, then specify the targets with a line break between each target. 

You can choose to activate or deactivate the access rule. 

Click on the « Add » button, then on « Save setting » to confirm your changes.



From the API


You will find the API token on your dashboard and the identifier of your configuration in the dashboard URL of your configuration. For example, https://www.fasterize.com/en/website_configs/1/dashboard has for configuration ID 1. 

# Fill in the blacklist ip adresses

curl -i -H 'Content-Type: application/json' -H 'Authorization: $myApiToken' -X PATCH https://api.fasterize.com/v1/configs/$config_id/ -d '{"security": { "deny": ["adresseIP1", "adresseIP2"] }}'


# Fill in the whitelist ip adresses

curl -i -H 'Content-Type: application/json' -H 'Authorization: $myApiToken' -X PATCH https://api.fasterize.com/v1/configs/$config_id/ -d '{"security": { "allow": ["adresseIP1", "adresseIP2"] }}'


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article