Block Rest of World Access Using Firewall Rules

I am trying to block access to a URL for anyone visiting OUTSIDE the USA/Canada.

Here is my expression- which doesn’t seem to work (UK and Singapore can get in no problem).

Any advice?

(http.request.full_uri eq “The Bus Network” and ip.geoip.country ne “CA”) or (ip.geoip.country ne “US”)

Thanks!

Greetings,

Thank you for asking.

So you want to create a Firewall Rule to block everyone except USA & Canada for specific URL?

Should be like:

Expression:

  • (http.request.full_uri eq "https://portal.thebusnetwork.com/login" and not ip.geoip.country in {"CA" "US"})

Unfortunately, I can access it too, only by using a VPN and a server from Canada/USA :wink:

Rather, I’d suggest you to start using Cloudflare Zero Trust / Access for your login.

3 Likes

This worked. Thanks!

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