如何在apache内部配置mod_qos以防止DoS攻击?

我们可以在 Docker 容器中安装 mod_qos 包。

然后我们可以在/..../modules/目录中验证mod_qos的模块是否安装。

如果安装正确,我们可以在/..../conf.d/mod_qos.conf文件中添加mod_qos.conf文件,配置如下

## QoS Settings
<IfModule mod_qos.c>
    # handles connections from up to 100000 different IPs
    #QS_ClientEntries 100000

    # will allow only 10 connections per IP
    QS_SrvMaxConnPerIP 30

    # maximum number of active TCP connections is limited to 256
    MaxClients 256
    
    # disables keep-alive when 70% of the TCP connections are occupied:
    
    QS_SrvMaxConnClose 180
    # minimum request/response speed (deny slow clients blocking the server i.e. slowloris keeping connections open without requesting anything
    QS_SrvMinDataRate 150 1200

    # and limit request header and body (carefull,that limits uploads and post requests too):
    LimitRequestFields 30
    QS_LimitRequestBody 102400
</IfModule>
qduwcf1 回答:如何在apache内部配置mod_qos以防止DoS攻击?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/16536.html

大家都在问