These are simplified patterns based on real work. Values change per client. The idea stays the same. Each rule aims to protect something specific, not to look clever.
Firewall rulecraft
Tight control over sensitive routes like logins and admin tools.
(http.request.uri.path contains "/wp-login.php"
and ip.geoip.country ne "GB")
Plain English: if someone tries to reach the WordPress login from outside the country you actually work in, they get challenged or blocked. Real staff use known locations or a VPN you trust.
Bot filtering
Respect good crawlers, slow down the noise.
if (cf.bot_management.score <= 20)
action = ManagedChallenge
Plain English: if Cloudflare is very confident it is an automated tool rather than a person, we make it solve a challenge. Good bots pass, low quality scraping tools usually do not bother.
Honeypots and canary routes
Hidden paths that only scanners find.
(http.request.uri.path eq "/.well-known/scan"
or http.request.uri.path eq "/old-admin")
Plain English: if anything touches these routes, it is not a normal visitor. We log it, alert if needed, and can block that source earlier next time.
Workers and edge responses
Let the edge deal with junk instead of your server.
if (country not in ["GB","IE"]) {
return new Response("Not available in your region", {
status: 403
});
}
Plain English: if your service is meant only for people in certain areas, requests from elsewhere never reach your hosting. They are handled at the edge with a clear response.