WAF rule is not working, blocking a specific country not working

The WAF rule is not working, I just really have a simple WAF rule blocking traffic from a specific country, when I tested from VPN, I was still able to get to the website.

Please advise.

Hi there,

When you are connected to the VPN you are testing from, can you provide to

https://<yoursite.com>/cdn-cgi/trace

This should provide you an output that you can see the loc field that is the country code that you are browsing from - just to confirm the IP is properly geo-located to Poland.

Also ensure you do not have any IP Access rules that are overriding your custom WAF Rule - IP Access rules · Cloudflare Web Application Firewall (WAF) docs as they execute before custom rules.

Hope this helps!

1 Like

Hi there,

Adding to what Damian said. Also note that WAF rules are executed in order, meaning that if you have a waf custom rule to skip the remaining rules before that one, it will bypass that block custom rule if it matches the other rule.

Take care.

1 Like

Thank you for the prompt reply, i have checked and found country code matches.
image

Also no active IP Access Rules

Just following up on my message below:

It seems like the WAF rule is not working on the FREE account anymore, I do have one paid account, and my rules worked just fine for it.

Can anybody confirm this?

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