Firewall rule to block certain countries is not working

I am trying to test the firewall rule option to block traffic from certain countries, and I have started by simply adding one country (France) as follows:

(ip.geoip.country in {“FR”}) then Block

But it seems I can still access the website from France as if nothing is there. My Cloudflare account is fresh (Free plan) and I haven’t edited anywhere in the settings.

How are you testing this?

Do you have any IP addresses set to Allow in Firewall → Tools?

Do you have any other Firewall Rules?

1 Like

I am trying to access it from France (where I am based)
There are no Allowed IPs in Firewall → Tools, and no other Firewall Rules.

Maybe something is wrong with the DNS records that are added automatically?

1 Like

It’s possible you’re not going through Cloudflare. What’s the domain?

1 Like

There is a slight delay when we are modifying or applying Firewall Rules, which could take up some short time (usually a few minutes or so) to make them work, at least.

Thank you @sdayman and @fritex for trying to help me solve this.

I have tried accessing the website from another network than mine and the firewall blocking rule worked! I have also tried blocking other countries and using a VPN to test, it also worked.

It seems that it blocks users in the specified countries except the ones connected to the local network that I used to access my Cloudflare account. Is it true?

It shouldn’t be. One thing I do to log firewall activity is an “Allow” for everything, and put it at the bottom of the list and watch the firewall log:

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