利用CloudFlare防火墙规则阻止恶意评论

(cf.threat_score gt 14 and http.request.uri contains "/wp-comments-post.php")

威胁分数大于14(相当于CF中级安全级别的设定),且URI中含有 /wp-comments-post.php ,进行JS质询

如果还是不行,就把 威胁分数大于14 改为 大于0,或者直接去除这个,对所有评论者进行质询


如果想要同时阻止恶意登录

((cf.threat_score gt 14)  and (http.request.uri.path contains "admin" or http.request.uri.path contains "login" or http.request.uri contains "/wp-comments-post.php")

威胁分数大于14,且URI中含有 admin 或 login 或 /wp-comments-post.php ,进行JS质询


发现大部分恶意评论来自online、OVH的IP (AS16276/AS12876)

((cf.threat_score gt 14) or ((ip.geoip.asnum eq 16276) or (ip.geoip.asnum eq 12876) and (cf.threat_score gt 0))) and (http.request.uri.path contains "admin" or http.request.uri.path contains "login" or http.request.uri contains "/wp-comments-post.php")

威胁分数大于14 或 (来自AS16276/AS12876且威胁分数大于0 ) ,且URI中含有 admin 或 login 或 /wp-comments-post.php ,进行JS质询


关于威胁分数:https://developers.cloudflare.com/firewall/known-issues-and-faq#how-can-i-use-the-threat-score-effectively

常见用例:https://developers.cloudflare.com/firewall/recipes

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注