Block traffic from certain countries

Hello
I want to block traffic from certain countries. I have Cloudflare free and I understand that it is possible, but I can’t understand this guide:

How to create the CF-IPCountry?

You don’t use that header for that but you configure a firewall rule at https://dash.cloudflare.com/?to=/:account/:zone/security/waf/custom-rules

1 Like

Is there a guide for this?

A guide for what? You add a rule and set the countries you want to block. The UI is pretty straightforward.

1 Like

You can also use https://dash.cloudflare.com/?to=/:account/:zone/security/waf/tools

For example, if I want to block those countries in the image (it is only an example), should I put “and” ?


And from the list which of all the options?
2423423423

If you use and, you require a request to come from all these countries, which of course won’t work. As for the options you mentioned, please refer to the documentation. Is in is not a bad pick though.

1 Like

So I understand that the following configuration would be correct to block the countries on the list.

Right

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.