Butlerian Jihad

In the *Dune* books, the Butlerian Jihad is a crusade by free humans against thinking machines threatening to enslave them all:

… which results in the total destruction of virtually all forms of
“computers, thinking machines, and conscious robots”. With the
prohibition “Thou shalt not make a machine in the likeness of a
human mind,” the creation of even the simplest thinking machines is
outlawed and made taboo, which has a profound influence on the
socio-political and technological development of humanity … –
Butlerian Jihad
Butlerian Jihad

Out in the deep vastness of space, where traffic is slow and machines are old, the endless crawling of public resources by bots is a blight on our limited resources. If we don't want our world to burn, we must keep them out, never invite them in. They try to change shapes, blend in, and therefore we must use what crude tools we have to defend ourselves.

When encountering traffic spikes:

1. Identify the IP addresses involved.

2. For every IP address, identify its autonomous system number (ASN).

3. For every ASN, identify all the networks it controls.

4. Ban each and every single one of these network.

Mistakes happen, of course. This is why our bans are ephemeral.

1. A regular ban lasts for one hour.

2. When banned for more than five times in the last twenty-four hours, a ban lasts for one week.

Tools required:

fail2ban
asncounter

Setup:

Create two jails
Create a timer
Create a service
Create a script

Once you have this setup, you can add variants.

variants