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-02-27 13:02:25 +0300
committersomebodywashere <68244480+somebodywashere@users.noreply.github.com>2024-02-27 13:02:25 +0300
commit754b591e4fb5d66d0a92e6e79e34e51e53e791d2 (patch)
tree14f591d1bedcbd4b78d25cf9860322b4bfb8bb3f
parent2b9d2d044c0a5147228e48ca27d1b4fae4553add (diff)
Changes to fail2ban to work with f2b 1.0+
Change default bantime to 15 minutes Mofidied logic a bit
-rw-r--r--x-ui.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/x-ui.sh b/x-ui.sh
index 1f5f5536..91efe7cf 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -947,8 +947,8 @@ run_speedtest() {
}
create_iplimit_jails() {
- # Use default bantime if not passed => 30 minutes
- local bantime="${1:-30}"
+ # Use default bantime if not passed => 15 minutes
+ local bantime="${1:-15}"
# Uncomment 'allowipv6 = auto' in fail2ban.conf
sed -i 's/#allowipv6 = auto/allowipv6 = auto/g' /etc/fail2ban/fail2ban.conf
@@ -959,8 +959,8 @@ enabled=true
filter=3x-ipl
action=3x-ipl
logpath=${iplimit_log_path}
-maxretry=4
-findtime=60
+maxretry=2
+findtime=32
bantime=${bantime}m
EOF
@@ -973,7 +973,7 @@ EOF
cat << EOF > /etc/fail2ban/action.d/3x-ipl.conf
[INCLUDES]
-before = iptables-common.conf
+before = iptables-allports.conf
[Definition]
actionstart = <iptables> -N f2b-<name>