From 257a7d8b05bf081ea338132012861cf4d196fee1 Mon Sep 17 00:00:00 2001 From: Denis Chevalier Date: Thu, 6 Aug 2026 13:32:38 +0200 Subject: fix fail2ban config --- etc.bash | 3 ++- etc/fail2ban/jail.d/sshd.conf | 19 +++++++++++++++++++ etc/fail2ban/sshd.local | 19 ------------------- 3 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 etc/fail2ban/jail.d/sshd.conf delete mode 100644 etc/fail2ban/sshd.local diff --git a/etc.bash b/etc.bash index f90599a..d3082cd 100755 --- a/etc.bash +++ b/etc.bash @@ -1,6 +1,7 @@ #!/bin/bash -sudo cp -rv ./etc/keyd/* /etc/keyd/ +sudo cp -v ./etc/keyd/keyd.conf /etc/keyd/ +sudo cp -v ./etc/fail2ban/jail.d/sshd.conf /etc/fail2ban/jail.d/ sudo cp -v ./etc/pacman.conf /etc/ sudo cp -v ./etc/kernel/cmdline /etc/kernel/ sudo cp -v ./etc/modprobe.d/blacklist-security.conf /etc/modprobe.d/ diff --git a/etc/fail2ban/jail.d/sshd.conf b/etc/fail2ban/jail.d/sshd.conf new file mode 100644 index 0000000..35a73c7 --- /dev/null +++ b/etc/fail2ban/jail.d/sshd.conf @@ -0,0 +1,19 @@ +[DEFAULT] +# Use UFW to execute IP bans +banaction = ufw + +# Read logs directly from systemd journal (required for Arch Linux) +backend = systemd + +# Ignore local traffic +ignoreip = 127.0.0.1/8 ::1 192.168.1.0/24 + +# Ban parameters +findtime = 10m +maxretry = 4 +bantime = 1h + +[sshd] +enabled = true +port = 39901 +mode = normal diff --git a/etc/fail2ban/sshd.local b/etc/fail2ban/sshd.local deleted file mode 100644 index 89f16ec..0000000 --- a/etc/fail2ban/sshd.local +++ /dev/null @@ -1,19 +0,0 @@ -[DEFAULT] -# Use UFW to execute IP bans -banaction = ufw - -# Read logs directly from systemd journal (required for Arch Linux) -backend = systemd - -# Ignore local traffic -ignoreip = 127.0.0.1/8 ::1 192.168.1.0/24 - -# Ban parameters -findtime = 10m -maxretry = 4 -bantime = 1h - -[sshd] -enabled = true -port = 22 -mode = normal -- cgit