From a4472c6ffe5824328424e130b5746f3de606bae7 Mon Sep 17 00:00:00 2001 From: Samuel Philipp Date: Sat, 20 Feb 2021 13:34:31 +0000 Subject: [PATCH] Add 'use-fail2ban.md' --- use-fail2ban.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 use-fail2ban.md diff --git a/use-fail2ban.md b/use-fail2ban.md new file mode 100644 index 0000000..45c2fc1 --- /dev/null +++ b/use-fail2ban.md @@ -0,0 +1,28 @@ +# Use Fail2ban + +## Installation + +``` +apt install fail2ban +``` + +## Configuration + +Add the following to `/etc/fail2ban/jail.d/defaults-debian.local`: + +``` +[DEFAULT] +# in seconds +bantime = 3600 +maxretry = 3 +backend = auto + +[sshd] +enabled = true +filter = sshd +backend = systemd +``` + +## Apply Changes + +Run `service fail2ban restart` to activate the changes.