[PR #6582] [CLOSED] fix(install): disable firewalld pulled in by fail2ban on RHEL family #6363

Closed
opened 2026-11-02 04:08:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6582
Author: @sdhfsl
Created: 9/17/2026
Status: ❌ Closed

Base: main ← Head: fix-el7-firewalld


📝 Commits (7)

  • 959e6fd fix(panel): accept 2FA codes from adjacent TOTP windows
  • f3096bb fix(panel): share TOTP skew tolerance with VerifyTwoFactorCode
  • 198ac75 Merge branch 'main' into main
  • acb0297 Merge branch 'MHSanaei:main' into main
  • 35b92a1 Merge branch 'MHSanaei:main' into main
  • 6a69d16 fix(install): disable firewalld pulled in by fail2ban on RHEL family
  • 0052b4e Merge branch 'main' into fix-el7-firewalld

📊 Changes

1 file changed (+18 additions, -0 deletions)

View changed files

📝 x-ui.sh (+18 -0)

📄 Description

Problem

Fixes #6569.

On RHEL-family hosts where firewalld is not installed, yum/dnf install fail2ban can pull firewalld in as a dependency, arriving enabled. Nothing breaks immediately, but after the next reboot its default public zone (ssh + dhcpv6-client only) rejects the panel port, the subscription port and every inbound port — looking exactly like a dead panel while x-ui runs fine.

Fix

In setup_fail2ban_iplimit (x-ui.sh): snapshot firewalld presence before the install; if the transaction introduced it on a host that never had it, systemctl disable --now firewalld and print the re-enable command. Hosts already using firewalld, and installs where fail2ban was already present, are untouched. Failure of the disable step never blocks the install.

Tests

bash -n syntax check passes. Logic walked through all four states (had/has matrix); no shellcheck in CI for this repo, verified by reading. Live EL7 verification isn't available in this environment — flagging that honestly.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6582 **Author:** [@sdhfsl](https://github.com/sdhfsl) **Created:** 9/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-el7-firewalld` --- ### 📝 Commits (7) - [`959e6fd`](https://github.com/MHSanaei/3x-ui/commit/959e6fd62b07efd1038d70ecc18c3bc59ce2e3c2) fix(panel): accept 2FA codes from adjacent TOTP windows - [`f3096bb`](https://github.com/MHSanaei/3x-ui/commit/f3096bb3c1e3091647101d80939da52ab054b21d) fix(panel): share TOTP skew tolerance with VerifyTwoFactorCode - [`198ac75`](https://github.com/MHSanaei/3x-ui/commit/198ac751d71b3b063a61b59efed80d50444febbf) Merge branch 'main' into main - [`acb0297`](https://github.com/MHSanaei/3x-ui/commit/acb0297c9b95da9d4157e751fe2789e851b34746) Merge branch 'MHSanaei:main' into main - [`35b92a1`](https://github.com/MHSanaei/3x-ui/commit/35b92a16d3770ee1c0351a1f5db75b635788fa32) Merge branch 'MHSanaei:main' into main - [`6a69d16`](https://github.com/MHSanaei/3x-ui/commit/6a69d164df244917027f36afac07258fe831423b) fix(install): disable firewalld pulled in by fail2ban on RHEL family - [`0052b4e`](https://github.com/MHSanaei/3x-ui/commit/0052b4eac7be60dc981357a89964ec492717d127) Merge branch 'main' into fix-el7-firewalld ### 📊 Changes **1 file changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `x-ui.sh` (+18 -0) </details> ### 📄 Description ## Problem Fixes #6569. On RHEL-family hosts where firewalld is not installed, `yum/dnf install fail2ban` can pull firewalld in as a dependency, arriving enabled. Nothing breaks immediately, but after the next reboot its default `public` zone (ssh + dhcpv6-client only) rejects the panel port, the subscription port and every inbound port — looking exactly like a dead panel while `x-ui` runs fine. ## Fix In `setup_fail2ban_iplimit` (`x-ui.sh`): snapshot firewalld presence before the install; if the transaction introduced it on a host that never had it, `systemctl disable --now firewalld` and print the re-enable command. Hosts already using firewalld, and installs where fail2ban was already present, are untouched. Failure of the disable step never blocks the install. ## Tests `bash -n` syntax check passes. Logic walked through all four states (had/has matrix); no shellcheck in CI for this repo, verified by reading. Live EL7 verification isn't available in this environment — flagging that honestly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:08:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6363
No description provided.