cloudflare防火墙规则设定代码,全能防御恶意流量

最近导航网站经常被流量攻击,疯狂跑网站流量,两个小时20G左右吧,一直困扰着我

 

图片[1]-cloudflare防火墙规则设定代码,全能防御恶意流量-风向旗

 

 

AVvXsEhrYkVadDC7T8D0Lywi046TKfzsv1OrUw_w-oSNeuNMPWZq_vTQoQUDuFwstJqOKFAds6kNFmXysnSO_BKKOfJg-pP_GjmEnWXp7n0ahUYeJr9oDsHikhw-QIwc0K3trldQYN12F5LyGu-JU7x1nyED0cYSmw8geKG_kfex5xUnB0GMGZiIHUdDp-LAw640-h350-1

 

添加防火墙规则表达式

第一(拦截规则)

(cf.threat_score ge 5 and not cf.client.bot) or (not http.request.version in {“HTTP/1.2” “HTTP/2” “HTTP/3” “SPDY/3.1”}) or (not http.user_agent contains “Mozilla/”)

第二(放行规则)

(cf.client.bot) or (http.user_agent contains “duckduckgo”) or (http.user_agent contains “facebookexternalhit”) or (http.user_agent contains “Feedfetcher-Google”) or (http.user_agent contains “LinkedInBot”) or (http.user_agent contains “Mediapartners-Google”) or (http.user_agent contains “msnbot”) or (http.user_agent contains “Slackbot”) or (http.user_agent contains “TwitterBot”) or (http.user_agent contains “ia_archive”) or (http.user_agent contains “yahoo”)

 

 

 

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享