Block a country except one person

block a country except one person. I tried adding IP address in firewall but it is dynamic and changing so I could not use IP address also I tried cookies but did not work, I created a cookie with value but the site still block him.

any other solution ?

They could VPN in through another country.

How about a user-agent? Is it also different or the same?

1 Like

Good thought. I know it’s possible for a browser to set a custom user agent string, and I believe Firewall Rules will let you filter on a custom header. That may require a paid plan, though. Maybe it doesn’t.

1 Like

Thanks when I change useragent google accounts redirected me to old UI version thinking I am using old browser.

Allow by IP or another method

Are you that one person from the country you want to block?

IP changing

Perhaps it would be beneficial in this case to use mTLS with a rule that blocks requests from a certain country where a client certificate is not provided?

Create a mTLS rule · Cloudflare Firewall Rules docs

2 Likes

thanks but why cookies does not work ?

This topic was automatically closed after 30 days. New replies are no longer allowed.