[GH-ISSUE #88] ngx_waf 的 paranoia level 調整 #64

Closed
opened 2026-03-04 12:18:39 +03:00 by kerem · 2 comments
Owner

Originally created by @ADeeeee on GitHub (Mar 28, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/88

因查找 issue 以及網路上無相關討論

請問一下在 current-dev v10.1.1 版本下啟用 modsecurity module 後,有辦法整合調整 Paranoia level (PL) 嗎?

目前我是取消註解 crs-setup.conf 裡面的 setvar:tx.paranoia_level 來調整,測試有效,但不知有無更簡便的方法,譬如使用 environment 來調整或是有個參數可以加入 waf_modsecuirty 內

SecAction \
  "id:900000,\
   phase:1,\
   nolog,\
   pass,\
   t:none,\
   setvar:tx.paranoia_level=4"
Originally created by @ADeeeee on GitHub (Mar 28, 2022). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/88 因查找 issue 以及網路上無相關討論 請問一下在 current-dev v10.1.1 版本下[啟用 modsecurity module](https://docs.addesp.com/ngx_waf/practice/enable-modsecurity.html) 後,有辦法整合調整 Paranoia level (PL) 嗎? 目前我是取消註解 crs-setup.conf 裡面的 setvar:tx.paranoia_level 來調整,測試有效,但不知有無更簡便的方法,譬如使用 [environment ](https://hub.docker.com/r/owasp/modsecurity-crs) 來調整或是有個參數可以加入 waf_modsecuirty 內 ``` SecAction \ "id:900000,\ phase:1,\ nolog,\ pass,\ t:none,\ setvar:tx.paranoia_level=4" ```
kerem 2026-03-04 12:18:39 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@ADD-SP commented on GitHub (Mar 29, 2022):

暂时没有更简便的方法来修改配置,不过你可以通过 shell 脚本来生成配置文件然后重载 NGINX 来实现这一目的。

#!/bin/bash
cat > modsec.conf  << EOF
SecAction          \\
  \"id:900000,     \\
   phase:1,        \\
   nolog,          \\
   pass,           \\
   t:none,         \\
   setvar:tx.paranoia_level=${PARANOIA_LEVEL}\"
EOF

nginx -s reload
<!-- gh-comment-id:1081878938 --> @ADD-SP commented on GitHub (Mar 29, 2022): 暂时没有更简便的方法来修改配置,不过你可以通过 shell 脚本来生成配置文件然后重载 NGINX 来实现这一目的。 ```shell #!/bin/bash cat > modsec.conf << EOF SecAction \\ \"id:900000, \\ phase:1, \\ nolog, \\ pass, \\ t:none, \\ setvar:tx.paranoia_level=${PARANOIA_LEVEL}\" EOF nginx -s reload ```
Author
Owner

@ADeeeee commented on GitHub (Apr 1, 2022):

知道了,希望未來有機會整合進 waf_modsecurity 設定值內
非常感謝

<!-- gh-comment-id:1085306267 --> @ADeeeee commented on GitHub (Apr 1, 2022): 知道了,希望未來有機會整合進 waf_modsecurity 設定值內 非常感謝
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#64
No description provided.