Coder Social home page Coder Social logo

safly / ngx_lua_anticc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leeyiw/ngx_lua_anticc

0.0 2.0 0.0 208 KB

HTTP flood attacks mitigation tool for Nginx

Home Page: https://github.com/leeyiw/ngx_lua_anticc

License: Apache License 2.0

Lua 100.00%

ngx_lua_anticc's Introduction

ngx_lua_anticc

ngx_lua_anticc is a CC(ChallengeCollapsar) attack mitigation tool for Nginx. CC attack (i.e. HTTP request flood) is kind of layer 7 DDoS attack. ngx_lua_anticc is an extension of Nginx based on ngx_lua. With it, you can easily add CC attack protection for your web server.

Download

Current release: ngx_lua_anticc-0.1.0.tar.gz.

Configure && Install

1. Prepare your nginx

To use ngx_lua_anticc, you must recompile your nginx with ngx_lua support, see the installation document over HERE. ngx_lua depends on LuaJIT (recommended) or Lua, please make sure you have installed LuaJIT/Lua before any further configuration.

2. Deploy ngx_lua_anticc with your nginx

  1. Uncompress the tarball to the same directory with the nginx.conf file.

  2. Edit your nginx.conf, add include ngx_lua_anticc/nla.conf; into the http section.

  3. Add include ngx_lua_anticc/nla_captcha.conf; into the server section.

3. Configure ngx_lua_anticc (IMPORTANT)

  1. Edit the config file ngx_lua_anticc/nla.conf. You MUST change the value of cookie_key to your own secret value. Otherwise, the attackers will generate verification cookie (by default cookie_key in source code) to bypass the protection mechanism designed by ngx_lua_anticc. Example:
config:add("cookie_key", "f136f204e0586f02")
  1. Add trusted IP into whitelist:
whitelist:add("127.0.0.1", true)

The boolean value means if the whitelist entry is enabled (true) or not.

4. Restart nginx

After you restart nginx, the Anti-CC protection is automatically enabled. Enjoy your web service without CC attacks!

ngx_lua_anticc's People

Contributors

leeyiw avatar

Watchers

James Cloos avatar Abyss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.