Nginx + Lua Anti-DDoS Script Authentication page like Cloudflare Bitmitigate sucuri etc

c0nw0nk nginx-forum at forum.nginx.org
Thu Aug 22 15:16:33 UTC 2019


So i thought i would share this here to get some feedback help bring to
light some improvements and bugs and to get the ball rolling on how we can
make this script better :)

I made this because I like the way Cloudflare, BitMitigate and such sites
protect their backends with a HTML, Javascript authentication puzzle for
those who have seen Cloudflares I am under attack mode! you know what this
will do :) You no longer need the third party services like cloudflare you
can now protect your own Nginx servers with it.

https://github.com/C0nw0nk/Nginx-Lua-Anti-DDoS

I was inspired by Cloudflare HTML Javascript based puzzle authentication
page to create this so i can use it on my own servers I hope some people
find it useful and will help make it better! <3

It is the same as I am under attack mode and the authentication pages of
websites under attack on services like Cloudflare, Bitmitigate, Sucuri etc.
It takes knowledge of Javascript, HTML, Nginx, Lua, HTTP Headers, Browsers,
Cookies to make this function.

Installation is as simple as download the .lua script put it in your nginx
config and then add this to a location or http block or server block in your
nginx config to protect those websites or the entire nginx server.

```
access_by_lua_file anti_ddos_challenge.lua;
```

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285373,285373#msg-285373



More information about the nginx mailing list