mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4085] [MERGED] x-ui.sh: bundle nftables when installing fail2ban #5594
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#5594
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/4085
Author: @pwnnex
Created: 4/22/2026
Status: ✅ Merged
Merged: 4/22/2026
Merged by: @pwnnex
Base:
main← Head:fix/iplimit-install-nftables📝 Commits (1)
71ac920x-ui.sh: install nftables alongside fail2ban in install_iplimit📊 Changes
1 file changed (+16 additions, -9 deletions)
View changed files
📝
x-ui.sh(+16 -9)📄 Description
Fresh Debian 12+, Ubuntu 24+ and recent RHEL-family minimal server images ship
fail2banwithbanaction = nftables-multiportas the default in/etc/fail2ban/jail.conf, but do not pull in thenftablespackage. The first SSH brute-force attempt reaches the defaultsshdjail and fail2ban logs:over and over until the attacker gives up. Noisy, looks like a 3x-ui regression on first install — see the discussion on #4083 where a user updated, checked
Service Status/Ban Logsfrom the x-ui menu, and assumed the update caused it.The
3x-ipljail itself is fine becausecreate_iplimit_jailswrites an iptables-based action (action.d/3x-ipl.confinherits fromiptables-allports.conf). But the default sshd jail is inherited from the distro fail2ban config and the noise is real.Add
nftablesto the package list in every branch ofinstall_iplimitso fresh installs end up with a working default sshd jail. Installs that already havenftablespresent are a no-op.No effect on existing deployments —
install_iplimitonly runs when the admin explicitly picks "Install IP Limit" from the x-ui menu, and only whenfail2ban-clientis not already on the system.Test plan
nftablesis already installed (apt / dnf / pacman / apk all no-op an already-installed package)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.