[GH-ISSUE #3822] Bug report #2583

Closed
opened 2026-10-31 20:26:30 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @ArminDeihim on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3822

Describe the bug

The Fail2ban doesn't work after updating from v2.8.9 to v2.8.10.
The log shows:

2026/02/17 14:01:04 INFO - X-UI: [LIMIT_IP] Client Par-New: Kept 1 newest IPs, disconnected 1 old IPs
2026/02/17 14:01:04 WARNING - X-UI: [LIMIT_IP] Failed to remove user Par-New: failed to remove user: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:10085: connect: connection refused"

I even opened port 10085 but still it doesn't work.

How to repeat the problem?

  1. Set IP limit to "1" on the panel for the user.
  2. Try to connect to VPN by two different devices with two different IPs.

Expected action

Resolve the IP Limit issue that bans users to connect with more than number of IPs that has been set on the panel for them.

Received action

Users are able to connect with unlimited IP addresses from multiple devices at the same time! That means IP Limit feature doesn't work even though Fail2ban is installed.

3x-ui Version

2.8.10

Xray-core Version

26.2.6

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.
Originally created by @ArminDeihim on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3822 ### Describe the bug The Fail2ban doesn't work after updating from v2.8.9 to v2.8.10. The log shows: 2026/02/17 14:01:04 INFO - X-UI: [LIMIT_IP] Client Par-New: Kept 1 newest IPs, disconnected 1 old IPs 2026/02/17 14:01:04 WARNING - X-UI: [LIMIT_IP] Failed to remove user Par-New: failed to remove user: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:10085: connect: connection refused" I even opened port 10085 but still it doesn't work. ### How to repeat the problem? 1. Set IP limit to "1" on the panel for the user. 2. Try to connect to VPN by two different devices with two different IPs. 3. ### Expected action Resolve the IP Limit issue that bans users to connect with more than number of IPs that has been set on the panel for them. ### Received action Users are able to connect with unlimited IP addresses from multiple devices at the same time! That means IP Limit feature doesn't work even though Fail2ban is installed. ### 3x-ui Version 2.8.10 ### Xray-core Version 26.2.6 ### Checklist - [x] This bug report is written entirely in English. - [x] This bug report is new and no one has reported it before me.
bsakaguchi 2026-10-31 20:26:30 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ArminDeihim commented on GitHub (Feb 17, 2026):

The IP Log in "Edit Client" menu doesn't show the IP of client, but it shows "[object Object]"!

<!-- gh-comment-id:3917522211 --> @ArminDeihim commented on GitHub (Feb 17, 2026): The IP Log in "Edit Client" menu doesn't show the IP of client, but it shows "[object Object]"!
Author
Owner

@csharpalfa commented on GitHub (Feb 19, 2026):

/etc/fail2ban/filter.d/3x-ipl.conf
As suggested in another thread, I changed this:

failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sSRC\s=\s*
to this:
failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sDisconnecting\sOLD\sIP\s=\s*

changed the port to 10085
in the logs, this is:

/usr/local/x-ui/x-ui[6636]: INFO - [LIMIT_IP] Client test: Kept 3 newest IPs, disconnected 1 old IP

Result: all other users except the test user were kicked out and not allowed into the system. This is a terrible bug, please fix it!

<!-- gh-comment-id:3924570882 --> @csharpalfa commented on GitHub (Feb 19, 2026): /etc/fail2ban/filter.d/3x-ipl.conf As suggested in another thread, I changed this: failregex = \[LIMIT_IP\]\s*Email\s*=\s*<F-USER>.+</F-USER>\s*\|\|\s*SRC\s*=\s*<ADDR> to this: failregex = \[LIMIT_IP\]\s*Email\s*=\s*<F-USER>.+</F-USER>\s*\|\|\s*Disconnecting\s*OLD\s*IP\s*=\s*<ADDR> changed the port to 10085 in the logs, this is: /usr/local/x-ui/x-ui[6636]: INFO - [LIMIT_IP] Client test: Kept 3 newest IPs, disconnected 1 old IP Result: all other users except the test user were kicked out and not allowed into the system. This is a terrible bug, please fix it!
Author
Owner

@ArminDeihim commented on GitHub (Feb 19, 2026):

[LIMIT_IP]\s_Email\s_=\s*.+\s*||\s_Disconnecting\s_OLD\s_IP\s_=\s*

After I changed this:

failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sSRC\s=\s*
to this:
failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sDisconnecting\sOLD\sIP\s=\s*

as you suggested to do, the Fail2ban crashed after restart and failed to restart:

fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2026-02-18 21:29:11 PST; 4s ago
Duration: 558ms
Docs: man:fail2ban(1)
Process: 141972 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
Main PID: 141972 (code=exited, status=255/EXCEPTION)
CPU: 283ms

Feb 18 21:29:10 mehr.parniaan.com systemd[1]: Started fail2ban.service - Fail2Ban Service.
Feb 18 21:29:11 mehr.parniaan.com fail2ban-server[141972]: Server ready
Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.

So, your suggested change even doesn't let Fail2ban to run.

<!-- gh-comment-id:3924806360 --> @ArminDeihim commented on GitHub (Feb 19, 2026): > [LIMIT_IP]\s_Email\s_=\s*.+\s*||\s_Disconnecting\s_OLD\s_IP\s_=\s* After I changed this: failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sSRC\s=\s* to this: failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sDisconnecting\sOLD\sIP\s=\s* as you suggested to do, the Fail2ban crashed after restart and failed to restart: fail2ban.service - Fail2Ban Service Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Wed 2026-02-18 21:29:11 PST; 4s ago Duration: 558ms Docs: man:fail2ban(1) Process: 141972 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION) Main PID: 141972 (code=exited, status=255/EXCEPTION) CPU: 283ms Feb 18 21:29:10 mehr.parniaan.com systemd[1]: Started fail2ban.service - Fail2Ban Service. Feb 18 21:29:11 mehr.parniaan.com fail2ban-server[141972]: Server ready Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Failed with result 'exit-code'. So, your suggested change even doesn't let Fail2ban to run.
Author
Owner

@ArminDeihim commented on GitHub (Feb 19, 2026):

I did that change, but it doesn't work. It stopped Fail2ban after restarting it.

fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2026-02-18 21:29:11 PST; 4s ago
Duration: 558ms
Docs: man:fail2ban(1)
Process: 141972 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
Main PID: 141972 (code=exited, status=255/EXCEPTION)
CPU: 283ms

Feb 18 21:29:10 mehr.parniaan.com systemd[1]: Started fail2ban.service - Fail2Ban Service.
Feb 18 21:29:11 mehr.parniaan.com fail2ban-server[141972]: Server ready
Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Thanks,Armin

On Wednesday, February 18, 2026 at 08:05:03 PM PST, csharpalfa ***@***.***> wrote:  

csharpalfa left a comment (MHSanaei/3x-ui#3822)
As suggested in another thread, I changed this:
failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sSRC\s=\s*
to this:
failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sDisconnecting\sOLD\sIP\s=\s*
changed the port to 10085
in the logs, this is:

/usr/local/x-ui/x-ui[6636]: INFO - [LIMIT_IP] Client @calonkrasoty: Kept 3 newest IPs, disconnected 1 old IP

Result: all other users were kicked out and are not allowed in!

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:3924873803 --> @ArminDeihim commented on GitHub (Feb 19, 2026): I did that change, but it doesn't work. It stopped Fail2ban after restarting it. fail2ban.service - Fail2Ban Service Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Wed 2026-02-18 21:29:11 PST; 4s ago Duration: 558ms Docs: man:fail2ban(1) Process: 141972 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION) Main PID: 141972 (code=exited, status=255/EXCEPTION) CPU: 283ms Feb 18 21:29:10 mehr.parniaan.com systemd[1]: Started fail2ban.service - Fail2Ban Service. Feb 18 21:29:11 mehr.parniaan.com fail2ban-server[141972]: Server ready Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION Feb 18 21:29:11 mehr.parniaan.com systemd[1]: fail2ban.service: Failed with result 'exit-code'. Thanks,Armin On Wednesday, February 18, 2026 at 08:05:03 PM PST, csharpalfa ***@***.***> wrote: csharpalfa left a comment (MHSanaei/3x-ui#3822) As suggested in another thread, I changed this: failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sSRC\s=\s* to this: failregex = [LIMIT_IP]\sEmail\s=\s*.+\s*||\sDisconnecting\sOLD\sIP\s=\s* changed the port to 10085 in the logs, this is: /usr/local/x-ui/x-ui[6636]: INFO - [LIMIT_IP] Client @calonkrasoty: Kept 3 newest IPs, disconnected 1 old IP Result: all other users were kicked out and are not allowed in! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***>
Author
Owner

@ArminDeihim commented on GitHub (Feb 19, 2026):

Thank you,
It was helpful to resolve the warning comment in log and Fail2ban to work. But still the panel doesn't show the user's IP address in IP Log.
Regards,Armin

On Thursday, February 19, 2026 at 06:58:12 AM PST, p4shark ***@***.***> wrote:  

p4shark left a comment (MHSanaei/3x-ui#3822)
check this #3795

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:3929755316 --> @ArminDeihim commented on GitHub (Feb 19, 2026): Thank you, It was helpful to resolve the warning comment in log and Fail2ban to work. But still the panel doesn't show the user's IP address in IP Log. Regards,Armin On Thursday, February 19, 2026 at 06:58:12 AM PST, p4shark ***@***.***> wrote: p4shark left a comment (MHSanaei/3x-ui#3822) check this #3795 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***>
Author
Owner

@MHSanaei commented on GitHub (Feb 20, 2026):

wait for new version

<!-- gh-comment-id:3933790321 --> @MHSanaei commented on GitHub (Feb 20, 2026): wait for new version
Author
Owner

@almen2006 commented on GitHub (Mar 6, 2026):

Version 2.8.11 It's the newest. A mistake still appears.  WARNING - X-UI: [LIMIT_IP] Failed to remove user 111111111: failed to remove user: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:10085: connect: connection refused"

<!-- gh-comment-id:4011155578 --> @almen2006 commented on GitHub (Mar 6, 2026): Version 2.8.11 It's the newest. A mistake still appears.  WARNING - X-UI: [LIMIT_IP] Failed to remove user 111111111: failed to remove user: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:10085: connect: connection refused"
Author
Owner

@MrFazilat commented on GitHub (Mar 7, 2026):

How to fix that for last update

set api port in config to 10085

  "inbounds": [
    {
      "tag": "api",
      "listen": "127.0.0.1",
      "port": 10085,
      "protocol": "tunnel",
      "settings": {
        "address": "127.0.0.1"
      }
    }
  ]

and edit

nano /etc/fail2ban/filter.d/3x-ipl.conf

replace that for 3x-ipl.conf

[Definition]
datepattern = ^%%Y/%%m/%%d %%H:%%M:%%S
failregex = Disconnecting OLD IP\s*=\s*<HOST>
ignoreregex =

and your ip limit now is work

<!-- gh-comment-id:4016240821 --> @MrFazilat commented on GitHub (Mar 7, 2026): How to fix that for last update set api port in config to 10085 ``` "inbounds": [ { "tag": "api", "listen": "127.0.0.1", "port": 10085, "protocol": "tunnel", "settings": { "address": "127.0.0.1" } } ] ``` and edit `nano /etc/fail2ban/filter.d/3x-ipl.conf` replace that for 3x-ipl.conf ``` [Definition] datepattern = ^%%Y/%%m/%%d %%H:%%M:%%S failregex = Disconnecting OLD IP\s*=\s*<HOST> ignoreregex = ``` **and your ip limit now is work**
Author
Owner

@almen2006 commented on GitHub (Mar 7, 2026):

Great. Thank you. It's all working.

<!-- gh-comment-id:4016298093 --> @almen2006 commented on GitHub (Mar 7, 2026): Great. Thank you. It's all working.
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#2583
No description provided.