Skip to content

Banning IPs of bots/kiddies from your servers. Use journalctl, netfilter (iptables) and Lua.

Notifications You must be signed in to change notification settings

jeangit/botoban

Repository files navigation

Botoban

🎶 Ban, ban, ban - with my Botoban ! 🎵

What is it ?

It's a script for banning IPs from your servers.

It uses journalctl, netfilter (iptables interface) and Lua.

What do you need ?

  1. Linux with systemd (obviously most of distros around).
  2. Lua (scripting language available on every distro).
  3. ipset (for blocking big batches of IP). Companion application of iptables, but often not installed by default.

Rights

You'll have to launch Botoban as root user, as it uses iptables.

Features

  1. Does not spread out in memory, exit when the job is done.
  2. Use well known shell interfaces, doesn't reinvent wheel.
  3. Use Lua table as its own database: no need to mess with external database.
  4. Use ipset for adding the whole earth if you want.
  5. Ban entire network, above a defined threshold of hosts IPs.
  6. Can be installed anywhere in your path, in a single directory for all it needs.
  7. Modules for parsing special files (like dmesg)

Configuration

It's a Lua table, self documented.

Launch

/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).

Credits

Botoban wouldn't be the same without them.

  1. For serializing tables : tprint.lua from TsT (https://github.com/tst2005/lua-tprint/)
  2. For range searching : Rhodium Toad reviewed & corrected original code (https://github.com/RhodiumToad)

About

Banning IPs of bots/kiddies from your servers. Use journalctl, netfilter (iptables) and Lua.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages