[GH-ISSUE #3774] [Question] No IP limit option when running a docker image #2544

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

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

Question

Hi, thank you for working on this amazing project.

I've read that 3x-ui has an IP Limit function, that is very useful to detect when links get leaked.
I'm running 3x-ui in a docker container, via docker-compose.yml from this git repo, and I don't see IP Limit option anywhere in the inbound settings.
I've read that fail2ban is required, but how do I set it up in Docker? Would it be possible to ship 3x-ui docker image with fail2ban preinstalled?

Checklist

  • This question is written entirely in English.
Originally created by @EntityinArray on GitHub (Feb 9, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3774 ### Question Hi, thank you for working on this amazing project. I've read that 3x-ui has an IP Limit function, that is very useful to detect when links get leaked. I'm running 3x-ui in a docker container, via docker-compose.yml from this git repo, and I don't see IP Limit option anywhere in the inbound settings. I've read that fail2ban is required, but how do I set it up in Docker? Would it be possible to ship 3x-ui docker image with fail2ban preinstalled? ### Checklist - [x] This question is written entirely in English.
bsakaguchi 2026-10-31 20:26:15 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@AdLf0208 commented on GitHub (May 29, 2026):

@EntityinArray Interesting part is that there's env variable XUI_ENABLE_FAIL2BAN: "true" but it does nothing.

I dove deeper and actually saw binaries installed within docker container itself even with configs in /etc/fail2ban but it does absolutely nothing and even when I set ip limit to 1 on particular client I was still able to connect using cellular and wifi network.

<!-- gh-comment-id:4574183675 --> @AdLf0208 commented on GitHub (May 29, 2026): @EntityinArray Interesting part is that there's env variable XUI_ENABLE_FAIL2BAN: "true" but it does nothing. I dove deeper and actually saw binaries installed within docker container itself even with configs in /etc/fail2ban but it does absolutely nothing and even when I set ip limit to 1 on particular client I was still able to connect using cellular and wifi network.
Author
Owner

@AdLf0208 commented on GitHub (May 29, 2026):

Please enter your selection [0-26]: 21

1. Install Fail2ban and configure IP Limit
2. Change Ban Duration
3. Unban Everyone
4. Ban Logs
5. Ban an IP Address
6. Unban an IP Address
7. Real-Time Logs
8. Service Status
9. Service Restart
10. Uninstall Fail2ban and IP Limit
0. Back to Main Menu

Choose an option: 7
2026-05-24 14:30:14,777 fail2ban.jail [16]: INFO Creating new jail '3x-ipl'
2026-05-24 14:30:14,779 fail2ban.jail [16]: INFO Jail '3x-ipl' uses poller {}
2026-05-24 14:30:14,780 fail2ban.jail [16]: INFO Initiated 'polling' backend
2026-05-24 14:30:14,781 fail2ban.datedetector [16]: INFO date pattern '^%Y/%m/%d %H:%M:%S': ^Year/Month/Day 24hour:Minute:Second
2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO maxRetry: 1
2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO findtime: 32
2026-05-24 14:30:14,781 fail2ban.actions [16]: INFO banTime: 1800
2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO encoding: UTF-8
2026-05-24 14:30:14,782 fail2ban.filter [16]: INFO Added logfile: '/var/log/x-ui/3xipl.log' (pos = 0, hash = )
2026-05-24 14:30:14,783 fail2ban.jail [16]: INFO Jail '3x-ipl' started

All this is it. So only initialization logs. But access.log in /var/log/x-ui/ is present and actually contains all the sniffed data: routes, ip addresses (src and dst), all of decision making based on these routes and so on. In the end I don't know what the underlying issue might be.

<!-- gh-comment-id:4574262413 --> @AdLf0208 commented on GitHub (May 29, 2026): Please enter your selection [0-26]: 21 1. Install Fail2ban and configure IP Limit 2. Change Ban Duration 3. Unban Everyone 4. Ban Logs 5. Ban an IP Address 6. Unban an IP Address 7. Real-Time Logs 8. Service Status 9. Service Restart 10. Uninstall Fail2ban and IP Limit 0. Back to Main Menu Choose an option: 7 2026-05-24 14:30:14,777 fail2ban.jail [16]: INFO Creating new jail '3x-ipl' 2026-05-24 14:30:14,779 fail2ban.jail [16]: INFO Jail '3x-ipl' uses poller {} 2026-05-24 14:30:14,780 fail2ban.jail [16]: INFO Initiated 'polling' backend 2026-05-24 14:30:14,781 fail2ban.datedetector [16]: INFO date pattern `'^%Y/%m/%d %H:%M:%S'`: `^Year/Month/Day 24hour:Minute:Second` 2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO maxRetry: 1 2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO findtime: 32 2026-05-24 14:30:14,781 fail2ban.actions [16]: INFO banTime: 1800 2026-05-24 14:30:14,781 fail2ban.filter [16]: INFO encoding: UTF-8 2026-05-24 14:30:14,782 fail2ban.filter [16]: INFO Added logfile: '/var/log/x-ui/3xipl.log' (pos = 0, hash = ) 2026-05-24 14:30:14,783 fail2ban.jail [16]: INFO Jail '3x-ipl' started All this is it. So only initialization logs. But access.log in /var/log/x-ui/ is present and actually contains all the sniffed data: routes, ip addresses (src and dst), all of decision making based on these routes and so on. In the end I don't know what the underlying issue might be.
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#2544
No description provided.