mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5527] [Question]: Conflict of fail2ban #3857
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3857
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @waltli on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5527
What are you trying to do?
Regarding the changelog for version 3.4.0:
🛡️ fail2ban-native IP limiting — IP limit is now gated on fail2ban (auto-installed on install/update) and reads onlines without parsing access.log.
I have a question: If fail2ban is already installed and running normally on the host, what will happen when installing 3x-ui 3.4.0? Will the existing fail2ban conflict with the newly installed one?
What have you already tried?
No response
3x-ui version
3.4.0
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Jun 24, 2026):
No conflict with an existing fail2ban installation. The installer detects fail2ban before attempting to install it, skips the package step if it is already present, and only adds 3x-ui-specific configuration files alongside whatever is already deployed.
What the installer actually does (confirmed in
x-ui.sh:setup_fail2ban_iplimit()andinstall.sh:setup_fail2ban()):fail2ban-clientis inPATH. If it is, the package installation block is skipped entirely with the message "Fail2ban is already installed."iplimit_remove_conflicts(), which only looks for a stale[3x-ipl]section inside/etc/fail2ban/jail.confand/etc/fail2ban/jail.localand removes it. All other sections in those files are left untouched./etc/fail2ban/jail.d/3x-ipl.conf/etc/fail2ban/filter.d/3x-ipl.conf/etc/fail2ban/action.d/3x-ipl.conf/etc/fail2ban/fail2ban.conf: uncommentsallowipv6 = autoif it was commented out./etc/fail2ban/jail.conf(Ubuntu 22.04+ / Debian 12+ only): changes the first occurrence ofbackend = autotobackend = systemd. This is the recommended backend on those systems and should not break existing jails.systemctl restart fail2banto load the new jail alongside any pre-existing ones.Your existing jails, filters, and actions are not modified or removed.
If you want to skip the fail2ban setup entirely (and keep the IP Limit feature disabled), set the following in
/etc/default/x-uibefore running the installer or update script:With that value set,
setup_fail2ban_iplimit()exits immediately without touching fail2ban at all. The panel runtime (internal/web/service/server.go:isFail2banEnabled()) also reads this variable and, when it is set to anything other thantrue, reports the IP Limit feature as not usable — so the per-client limit fields are disabled in the UI.This reply was generated automatically; a maintainer may follow up.