Cloudflare comes with 5 default firewall rules, completely free. The pro version can be used for only 50 yuan per year, for example: Cloudraft But having the pro version alone is not enough, you still need to create some rules to protect against CC attacks. It is best to have the CF pro package for your website and enable HTTPS. Let me briefly share my rules first. Blocking rules: Tor is onion routing and can be blocked. Block requests with a threat score greater than or equal to 5. Normal visitors with a low threat score will not trigger this rule, so don't worry about false positives. CAPTCHA rules: The first part means blocking HTTPS requests with HTTP version 1, because normal visitors accessing HTTPS use HTTP version 2, and only proxy CC requests will use HTTP version 1. This rule only works if your website has HTTPS enabled. As for the user agent, it prevents some strange user agents. If the threat score is greater than 1, a CAPTCHA will be displayed. Normal browsers and clean IPs will not trigger this rule. The last rule is to prevent IP spoofing. In addition to setting rules, you also need to configure some other things. For example, HTTP DDOS, set all to maximum: For automatic programs, only enable JS detection (other features require the enterprise version): There are also hosting rules, you can click to see, they are quite useful strategies. Cache configuration Set the cache level to Ignore Query String Page rules You can refer to mine: The last one is configuring forced HTTPS (redirect on Cloudflare, no need to go back to the origin server). First, in Page Rules -> Transform Rules, create a URL rewrite: After creating the transform rule, go to Page Rules and set the redirect: Note that the priority of this page rule must be first. In theory, after setting the above rules, you should be able to effectively defend against proxy CC attacks. If you encounter botnet CC attacks, you can only enable request rate limiting.
Defend against CC attacks using Cloudflare Firewall
AI Translation
This post is translated from Chinese into English through AI.View Original
AI-generated summary
Cloudflare firewall can be used to defend against CC attacks. Cloudflare provides 5 default firewall rules for free. The pro version offers additional features for a yearly fee. It is recommended to have the CF pro package and enable HTTPS for your website. The rules include blocking Tor, blocking threats with a score of 5 or higher, using captcha for threats with a score of 1 or higher, and preventing IP spoofing. Other settings such as HTTP DDOS protection, JS detection, and caching configuration are also important. Finally, configuring forced HTTPS redirection is recommended. Overall, these rules can effectively defend against proxy CC attacks, and rate limiting may be necessary for botnet CC attacks.