首页 > 系统相关 >nginx 一些简单访问控制模块

nginx 一些简单访问控制模块

时间:2022-10-07 12:03:52浏览次数:71  
标签:en http 访问控制 docs module nginx 模块 ngx

nginx 已经内置了一些简单的访问控制模块,利用好这些模块我们可以提升系统的安全

几个比较有用的标准模块

基本都是利用了access 阶段的能力

  • limit_except 限制请求方法的(类似白名单,可以与access 集成使用)
  • access 的allow 以及deny (ip 防护,支持基于cidr 模式的)
  • auth_basic basic auth 模式
  • auth request (默认没有构建,可以自定义请求地址的auth 认证)
  • limit conn 以及limit req 限制流量以及请求连接的
  • referer 模块的,简单referer处理(可以做一些简单的referer 安全控制)

三方扩展模块

比如利用openresty lua 模块,社区开发的ldap,jwt 。。。。。

说明

安全对于nginx 是比较重要的,因为业务直接基于nginx 进行了访问,如果不能更好的支持安全控制,我们的业务系统安全风险就比较大了

参考资料

​https://nginx.org/en/docs/http/ngx_http_core_module.html#satisfy ​

​https://nginx.org/en/docs/http/ngx_http_core_module.html ​

​https://nginx.org/en/docs/http/ngx_http_access_module.html ​

​https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html ​

​https://nginx.org/en/docs/http/ngx_http_auth_request_module.html ​

​https://nginx.org/en/docs/http/ngx_http_limit_conn_module.html ​

​https://nginx.org/en/docs/http/ngx_http_limit_req_module.html ​

​https://nginx.org/en/docs/http/ngx_http_realip_module.html ​

​https://nginx.org/en/docs/http/ngx_http_userid_module.html ​

​https://nginx.org/en/docs/http/ngx_http_referer_module.html​

标签:en,http,访问控制,docs,module,nginx,模块,ngx
From: https://blog.51cto.com/rongfengliang/5734374

相关文章

  • nginx proxy webservie 问题&实践
    webservice具有特殊性,因为wsdl文件是服务器端生成的(大部分,而且是动态的),所以我们直接使用nginx进行proxy会有问题实际上此问题比较常见,而且网上也有人碰到,可能因为时间......
  • 一次nginx 请求真实ip 问题处理
    nginxngx_http_realip模块是比较重要的,我以前也大概说过,同时网上关于此模块的资料也不少,今天就碰到了一个获取真实ip的问题记录下参考业务模型  问题以前的配置,waf......
  • nginx ngx_http_addition_module 模块openresty content_by_lua 不能生效的原因
    nginx的ngx_http_addition_module模块也是一个修改content的好东西,对于openresty我们经常使用content_by_lua阶段处理但是经过分析ngx_http_addition_module源码的......
  • nginx 的 ngx_http_addition_module 模块
    nginx的ngx_http_addition_module提供了before以及after的能力,可以方便进行请求的处理参考使用环境docker-compose文件version:'3'services:app:image:openr......
  • CentOS下nginx的安装流程
     1基础配置系统:CentOSLinuxrelease7.9.2009(Core)NginX版本:nginx-1.20.1查看操作系统名称:cat/etc/centos-release查看相关系统信息:uname-auname--help可以查看具......
  • nginx 配置go服务反向代理
    nginx配置详细请看Nginx极简教程server{listen80;server_namelocalhost;#charsetkoi8-r;#nginx访问活动日志access_log......
  • 3.iptables 扩展模块
    multiport:添加多个不连续端口示例:10.0.0.10访问本机20、21、80、443允许通过;[root@route~]#iptables-tfilter-IINPUT-s10.0.0.10-d10.0.0.200-ptcp-mmu......
  • nginx自定义时间格式
    在每个server中加入:if($time_iso8601~"^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})"){set$year$1;......
  • Python语法之模块和包
    这一节,我将为大家介绍模块和包:在开发大型软件时,随着代码写的越来越多,如果将所有的代码都放在一个文件里,势必为以后的维护带来很大的困难。正如仓颉造字一样,仓颉是黄帝的史......
  • JavaScript之无题之让人烦躁的模块化
    我怎么记得我好像写过相关类型的文章,但是我找遍了我的博客没有~那就再写一遍吧,其实模块化的核心内容也算不上是复杂,只不过需要整理一下,规划一下罢了。嘻嘻。开始写......