From 5ba9d6e1186bd03575078b492f1978548662b746 Mon Sep 17 00:00:00 2001 From: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:39:20 +0300 Subject: [IPLimit] Optimize + Debian 12 compability --- x-ui.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'x-ui.sh') diff --git a/x-ui.sh b/x-ui.sh index 91efe7cf..a94852f2 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -953,9 +953,15 @@ create_iplimit_jails() { # Uncomment 'allowipv6 = auto' in fail2ban.conf sed -i 's/#allowipv6 = auto/allowipv6 = auto/g' /etc/fail2ban/fail2ban.conf + #On Debian 12+ fail2ban's default backend should be changed to systemd + if [[ "${release}" == "debian" && ${os_version} -ge 12 ]]; then + sed -i '0,/action =/s/backend = auto/backend = systemd/' /etc/fail2ban/jail.conf + fi + cat << EOF > /etc/fail2ban/jail.d/3x-ipl.conf [3x-ipl] enabled=true +backend=auto filter=3x-ipl action=3x-ipl logpath=${iplimit_log_path} -- cgit v1.2.3