🎶 Ban, ban, ban - with my Botoban ! 🎵
It's a script for banning IPs from your servers.
It uses journalctl, netfilter (iptables interface) and Lua.
- Linux with systemd (obviously most of distros around).
- Lua (scripting language available on every distro).
- ipset (for blocking big batches of IP). Companion application of
iptables
, but often not installed by default.
You'll have to launch Botoban as root user, as it uses iptables.
- Does not spread out in memory, exit when the job is done.
- Use well known shell interfaces, doesn't reinvent wheel.
- Use Lua table as its own database: no need to mess with external database.
- Use ipset for adding the whole earth if you want.
- Ban entire network, above a defined threshold of hosts IPs.
- Can be installed anywhere in your path, in a single directory for all it needs.
- Modules for parsing special files (like dmesg)
It's a Lua table, self documented.
/path/to/botoban config.lua
(no need to give the path of the config, as long as it stays in the same place than botoban).
Botoban wouldn't be the same without them.
- For serializing tables : tprint.lua from TsT (https://github.com/tst2005/lua-tprint/)
- For range searching : Rhodium Toad reviewed & corrected original code (https://github.com/RhodiumToad)