Blocking Country but accept some users from that Country!

I want to block the country!!! , but miss certain users from that country?
can it be filtered with user-agent?
please some advice!!!
Thank you

Absolutely, with firewall rules.

am add this like you say !!!
but still blocking , here is my setup

Sure, because you changed the expression. You need to implement what I posted. Also, check out the documentation for further details.

implement ???
where and what
I added a user agent that should be missed !!
what else needs to be done, please explain if it’s not a problem
thank you

Well, you added an or which changes the expression.

What you are currently doing is blocking all requests which are from one of the listed countries and do not have the user agent in question or all requests from FYRM. I presume you want to exclude the user agents from FYRM as well, so that or cannot work. You also seem to have an additional or for something else.

You really need to first check out Rules language · Cloudflare Ruleset Engine docs and learn how the expressions are built before you configure that.

can you write it correctly so I can see where I’m wrong?

Please first check out the documentation and post what else you have tried. But you can start with dropping the ors.

means !!!
I want to block these countries up on the list
but I want to miss this user agent " stb_130A054B4953AD39_0.1.574 "


even though he is in a country that is on the blocked list above.

Well, did you read the documentation and what else have you tried? The example I provided in the first response is really all you need to do.

What you just posted does not mention a user agent and is still using ors.

I tried with the " or " option under the blocked countries and the " user-agen " does not equal " stb_130A054B4953AD39_0.1.574
then he blocked that user agent in the requests that are not blocked

blocked that user-agent completely, instead of letting it pass through blocked countries?

Well, post a screenshot of your rule, but make sure it follows exactly my example. You can use is in instead of equals for the country.

I had to remove it because it blocks all other users who use that user agent

There does not seem to be a screenshot in your message.

What about?

equals not block country !!

We are going in circles here.

Delete all your firewall rules and set it up exactly as explained at Blocking Country but accept some users from that Country! - #2 by sandro and


is it this good
this am crate new roule