Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
##ngx_lua_waf
## ngx_lua_waf

ngx_lua_waf是我刚入职趣游时候开发的一个基于ngx_lua的web应用防火墙。

代码很简单,开发初衷主要是使用简单,高性能和轻量级。

现在开源出来,遵从MIT许可协议。其中包含我们的过滤规则。如果大家有什么建议和想fa,欢迎和我一起完善。

###用途:
### 用途:

防止sql注入,本地包含,部分溢出,fuzzing测试,xss,SSRF等web攻击
防止svn/备份之类文件泄漏
Expand All @@ -16,14 +16,14 @@ ngx_lua_waf是我刚入职趣游时候开发的一个基于ngx_lua的web应用
屏蔽图片附件类目录php执行权限
防止webshell上传

###推荐安装:
### 推荐安装:

推荐使用lujit2.1做lua支持

ngx_lua如果是0.9.2以上版本,建议正则过滤函数改为ngx.re.find,匹配效率会提高三倍左右。


###使用说明:
### 使用说明:

nginx安装路径假设为:/usr/local/nginx/conf/

Expand All @@ -45,7 +45,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/
然后重启nginx即可


###配置文件详细说明:
### 配置文件详细说明:

RulePath = "/usr/local/nginx/conf/waf/wafconf/"
--规则存放目录
Expand Down Expand Up @@ -78,7 +78,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/
--警告内容,可在中括号内自定义
备注:不要乱动双引号,区分大小写

###检查规则是否生效
### 检查规则是否生效

部署完毕可以尝试如下命令:

Expand All @@ -88,7 +88,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/
注意:默认,本机在白名单不过滤,可自行调整config.lua配置


###效果图如下:
### 效果图如下:

![sec](http://i.imgur.com/wTgOcm2.png)

Expand All @@ -102,7 +102,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/

只记录过滤日志,不开启过滤,在代码里在check前面加上--注释即可,如果需要过滤,反之

###一些说明:
### 一些说明:

过滤规则在wafconf下,可根据需求自行调整,每条规则需换行,或者用|分割

Expand Down