Skip to content

Instantly share code, notes, and snippets.

@deatharse
deatharse / fail2ban-manually-create-jail.md
Last active November 14, 2020 13:01
Create Fail2ban jail Manually

Manually create a Fail2Ban jail using fail2ban-client (pre-0.10)

N.B. any syntax / function changes made within fail2ban-client will alter the commands used. The commands used here worked with versions 0.8.6-3wheezy3 and 0.8.13-1. 0.9 may or may not work exactly using the below.

For anyone visiting this and stuck on a version pre 0.10 where you want to add a jail but do not want run reload (which pre 0.10 stops and starts all enabled jails as well as reparsing the config

Please bear in mind this is for a Debian environment - specifically Jessie so directive in apache
vhost will differ if you're not using apache-2.4.
I followed the instructions for the development environment (N.B. DO NOT use `test` as the account
for `createsuperuser` as this will break `loaddate test_data`):
sudo mkdir /usr/share/readthedocs
sudo chown your_username readthedocs
sudo apt-get install build-essential python-dev libxml2-dev libxslt1-dev zlib1g-dev virtualenv git
cd /usr/share/