Cloudflare Firewall Rules for WordPress: JS Challenge

Rule 1: Allow Good Bots | Rule 2: Block Potentially Malicious Requests | Rule 3: Block Bad Bots | Rule 4: JS Challenge

In some cases I want to keep bots off a page, but I don’t want to block or unduly inconvenience humans. A JavaScript challenge will display an interstitial page for about five seconds while Cloudflare performs a magical check to verify the visitor is human. Suspected bots will be served a Captcha.

Read more Cloudflare Firewall Rules for WordPress: JS Challenge

Cloudflare Firewall Rules for WordPress: Block Bad Bots

Rule 1: Allow Good Bots | Rule 2: Block Potentially Malicious Requests | Rule 3: Block Bad Bots | Rule 4: JS Challenge

Good bots are whitelisted by Rule 1. Some bad bots will be blocked by Rule 2. I’d like Rule 3 to block *all* remaining bots, but that isn’t possible as far as I know. I’ll block as many as I can.

Read more Cloudflare Firewall Rules for WordPress: Block Bad Bots

Cloudflare Firewall Rules for WordPress: Block Potentially Malicious Requests

Rule 1: Allow Good Bots | Rule 2: Block Potentially Malicious Requests | Rule 3: Block Bad Bots | Rule 4: JS Challenge

The order of the next three rules is less important. It makes a difference in terms of logging – if a bot is blocked by rule 2 it won’t be logged by rule 3 – but not in effectiveness. Rule 2 blocks potentially malicious requests, whether they originate from bad bots or humans. This is a long rule set, so I’ll break it down.

I want to block …

Read more Cloudflare Firewall Rules for WordPress: Block Potentially Malicious Requests

Is it safe? Cloudflare’s BGP checker.

What is BGP?

Border Gateway Protocol (BGP) is the postal service of the Internet … when someone submits data across the Internet, BGP is responsible for looking at all of the available paths that data could travel and picking the best route

BGP is an essential Internet protocol. But it has a weakness. It can occasionally go wonky, either by accident or by malicious actions. For example, routing large amounts of Internet traffic through a Russian-government-owned ISP. Read more Is it safe? Cloudflare’s BGP checker.

Good bots

Cloudflare offers a field called cf.client.bot that I can use to avoid having my firewall rules inadvertently block search engines and other good bots. But what does Cloudflare consider a “good bot”, and does their definition match mine? Kinda hard to say. Cloudflare does not make an up-to-date list of good bots available to the public. But, I can set a firewall rule to Allow cf.client.bot, then monitor the firewall event log over time to see which bots are being allowed. I’m unlikely to catch all the good bots, but I will get a pretty good idea. Read more Good bots