cflare block & unblock

Instant Edge Block & WAF Rules

WAF Drop

Instantly ban, challenge, or drop abusive IP addresses, CIDR subnets, or rogue countries at the edge.

$ cflare block <ip|country> <domain> <target> [options] cflare unblock <domain> <target>

📖 Full Explanation

\1 gives system administrators an edge firewall hammer. Whether an attacker is launching brute-force attacks against \1 or scanning for \1 files, you can blacklist their IP address or CIDR range instantly across the entire Cloudflare edge.

⚙️ Command Options & Flags

Option / Flag Description Default
-m, --mode <action> Mitigation action: block, challenge, js_challenge, managed_challenge block
-n, --note <text> Administrative audit note for the firewall rule CLI block
--json Output rule details in JSON format false

🔬 Technical Corollary & Edge Mechanics

Creates an IP Access Rule via \1 or an expression rule in Cloudflare WAF Custom Rulesets. Rules with action \1 return immediate HTTP 403 Forbidden at the edge, consuming zero origin resources.

🎯 Real-World DevOps Use Cases

Banning Abusive Scraper IP

Instantly drop all incoming connections from a malicious crawler.

$ cflare block ip namishkumar.in 198.51.100.42 --note "Abusive scraper"

Enforcing Geographic Access Rules

Challenge all traffic arriving from specific high-risk jurisdictions during security audits.

$ cflare block country example.com RU --mode managed_challenge

💻 Live Output Simulation

$ cflare block ip namishkumar.in 198.51.100.42 --note "Brute force attacker"
✔ Created edge firewall rule:
  ID:     3a829f01bc4892e8a7192834
  Target: 198.51.100.42 (ip)
  Action: block (Drop at edge)
  Notes:  Brute force attacker