ayconanw

请问 cf 能添加类似同一个 ip 每 5 分钟不能访问超过 10 次这种规则吗?

  •  
  •   ayconanw · Apr 13, 2022 · 2238 views
    This topic created in 1515 days ago, the information mentioned may be changed or developed.

    有一个业务的接口,被人攻击了,无奈只好套上 cf 用。 但是虽然防住了 ddos 攻击,却失去了 ip 规则限制(因为都是 cf 的 ip 不能限制),有什么办法在 cf 里设置类似 同一个 ip 5 分钟内访问超过 10 次就封禁该 ip 半小时这种规则吗。

    2 replies    2022-04-13 22:44:08 +08:00
    eason1874
        1
    eason1874  
       Apr 13, 2022   ❤️ 1
    CF 可以设置。在 安全性 > WAF > 速率限制规则

    另外,CF 也会把访问用户 IP 通过 header 传递给你,服务器配置一下 real ip 就可以
    ayconanw
        2
    ayconanw  
    OP
       Apr 13, 2022
    非常感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   923 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:49 · PVG 06:49 · LAX 15:49 · JFK 18:49
    ♥ Do have faith in what you're doing.