Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsomebodywashere <68244480+somebodywashere@users.noreply.github.com>2024-03-05 17:38:47 +0300
committerGitHub <noreply@github.com>2024-03-05 17:38:47 +0300
commit2f594ca7c949480af2860d70a6cf475bde486223 (patch)
treeee1ac7c6ec09e0ef34ab63367da7cb1210ca4aaf /x-ui.sh
parentc47a67975f5fd4de81c6fc9e9dac12a3e3cdbbaf (diff)
parentecae6e5ead96bc00cbba819331014e13a84392fe (diff)
[IPLimit] Optimize + Debian 12 compability
[IPLimit] Optimize + Debian 12 compability
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh6
1 files changed, 6 insertions, 0 deletions
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}