Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/p0pr0ck5/lua-resty-tarpit
OpenResty response time inflation
https://github.com/p0pr0ck5/lua-resty-tarpit
brute-force lua nginx openresty
Last synced: 3 days ago
JSON representation
OpenResty response time inflation
- Host: GitHub
- URL: https://github.com/p0pr0ck5/lua-resty-tarpit
- Owner: p0pr0ck5
- Created: 2015-01-11T10:42:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T08:15:26.000Z (about 2 years ago)
- Last Synced: 2024-02-14T17:33:33.024Z (9 months ago)
- Topics: brute-force, lua, nginx, openresty
- Language: Lua
- Homepage:
- Size: 3.91 KB
- Stars: 26
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-resty - lua-resty-tarpit
- nginx-resources - Capture and delay unwanted requests
README
##Name
lua-resty-tarpit - capture and delay unwanted requests
##Status
lua-resty-tarpit is in early development and is considered production ready.
##Description
lua-resty-tarpit provides rate-limit protection for sensitive resources. It leverages Nginx's non-blocking archtitecture to artificially increase response latency for resources that are repeatedly accessed. This functionality is designed to protect resources that are publicly accessible, but vulnerable to some form of brute-force attack (e.g., web application admnistrative login pages). It was inspired by the TARPIT iptables module.
##Installation
Clone the lua-resty-tarpit repo into Nginx/OpenResty's Lua package path. Module setup and configuration is detailed in the synopsis.
##Synopsis
```lua
http {
lua_shared_dict tarpit 10m;
}server {
location /login { # or whatever resource you want to protect
access_by_lua '
local t = require "tarpit"
t.tarpit(
5, -- request limit
5, -- reset timer
1, -- delay time
)
';
}
}
```##Limitations
lua-resty-tarpit is undergoing continual development and improvement, and as such, may be limited in its functionality and performance. Currently known limitations can be found within the GitHub issue tracker for this repo.
##License
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, see##Bugs
Please report bugs by creating a ticket with the GitHub issue tracker.