FIrewall is not working - for many countries

I have tried to setup a firewall to block from certain countries but is still not working.

What is the domain?

Can you show a screenshot of your rules?

It is recommended to:


( ne “US”) or ( ne “CA”) or ( ne “KR”)
(ip.geoip.continent ne “NA”)
(not cf.tls_client_auth.cert_verified and http.request.uri.path in {“”})
( eq “ZA”) or ( eq “IN”) or ( eq “SA”)

none of the dns is proxied.

If not proxied, requests are going direct to your origin and not passing through Cloudflare for the WAF to do anything.

Your WAF rules need some work. For example, ( ne “US”) or ( ne “CA”) or ( ne “KR”) will always be true. If I’m in the US, then the last 2 terms are true so the expression is true. You need to use “AND” in place of “OR”.

Hi @aandrewyoo

Any rule in Cloudflare (page rule, cache rule, firewall and so on) will only work on traffic routed through Cloudflare and when your DNS records are not proxied/orange clouded, then the traffic is not going through Cloudflare.

Hi @aandrewyoo, your topic has a solution here.

Let us know what you think of the solution by logging in and give it a :+1: or :-1:.

Solutions help the person that asked the question and anyone else that sees the answer later. Login to tell us what you think of the solution with a :+1: or :-1:.

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