From cbfd7dcb7551f65f0ae4c79e3578b6c9d9cdbb0a Mon Sep 17 00:00:00 2001 From: puhui222 <56866561+puhui222@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:25:08 +0800 Subject: [PATCH] =?UTF-8?q?IP=E9=BB=91=E5=90=8D=E5=8D=95=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rules/ip-block.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rules/ip-block.lua diff --git a/rules/ip-block.lua b/rules/ip-block.lua new file mode 100644 index 0000000..2e2db96 --- /dev/null +++ b/rules/ip-block.lua @@ -0,0 +1,18 @@ +--[[ +规则名称: IP block + +过滤阶段: 请求阶段 + +危险等级: 低危 + +规则描述: 手动添加对恶意IP进行封禁,类似IP黑名单 +--]] + + +local ip = waf.ip + +if waf.contains(ip,"10.20.11.193") then + return waf.block(true) -- 重置TCP连接,不记录日志 + end + +return false