mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #59] IP 黑名单似乎不支持 0.0.0.0/0 ? #175
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LodeSNA on GitHub (Aug 10, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/59
版本为最新的 ngx_waf v7.0.0 Current,Nginx 版本为 1.20.1,预编译的动态模块(sh assets/download.sh 1.20.1 current)
测试环境配置好 Nginx 之后,在 ipv4 写上 0.0.0.0/0,在 white-ipv4 写上本机 IP 如 192.168.1.100,实际效果是黑名单没有生效,其它 IP 的机器都可以访问得到网站。
将某个 IP 如 192.168.1.101 加入到黑名单后,在 192.168.1.101 这台机器上是无法访问到网站的,证明黑名单已生效。
其实就是想知道,是否支持纯白名单模式。
@ADD-SP commented on GitHub (Aug 10, 2021):
感谢您报告了这个 bug,我们开发时确实没有考虑到形如
w.x.y.z/0这样的 IP 地址。修复补丁已经上传到current-dev分支,您可以下载测试。如果 bug 被修复请您关闭本 issue,反之请告知。
说句题外话,如果仅仅只需要 IP 白名单这一个功能的话似乎不需要本模块,nginx 的官方模块
ngx_http_access_module就可以实现,详见 https://nginx.org/en/docs/http/ngx_http_access_module.html#allow 。@LodeSNA commented on GitHub (Aug 11, 2021):
已修复。