What the the best cloudlfare tools that we can use for limit access for a city?
let's say we have an we app, where we only testing out, and we only want people in certian city can have access , what cloudlfare tools we can use ?
added: the web app is providing local service through a web app. ideally, only the people in that city should be able to see the "site", that is what would like to achieve.
4 Replies
Strictly speaking, You can use a simple Custom Rule with the City field (have to use a custom expression, click "Edit Expression"), and something like
(ip.src.city ne "New York")
, action block
You can also use Country, which you can use in the visual expression editor.
I wouldn't really recommend it though, this is all just information from the IP, which isn't always right. City especially could be wrong, Country is usually more accurate although perhaps not as much in smaller countries. Cloudflare uses Maxmind's DB for GeoIP Data. People might use VPNs, or just be unlucky with their ISP not doing their job in setting Geo Data correctly, etcIf people have to sign up for your app and provide their address you could quietly in the backend add people to a waiting list for the app if they aren’t in the City you are testing? The CX would be better as well.
will try that. I mean if people really use vpn. the services is still no avaiable to them since the web app provide local services.
can you please explain what CX is ?
I assume he means customer experience, i.e it's a lot better user experience to give them a reason for them not being able to access your app, and maybe even a wait list, rather then a block screen. Also this would let them input their city, to avoid any false postives/issues with geoip