mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #1212] IP limit really doesn't work #829
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#829
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 @likstanov on GitHub (Nov 10, 2023).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1212
Welcome
Description of the problem,screencshot would be good
Hi there. I've red many issues from another users about IP limit problem and I can confirm that. I installed 3x-ui via author's script (without docker), I installed "fail2ban", I also edited log in "x-ray" config as author recommended: https://github.com/MHSanaei/3x-ui/issues/1138#issuecomment-1768685978. IP limit doesn't work.
I have logs like that:
2023/11/10 14:51:51 DEBUG - disAllowedIps [95.95.95.95]// I replaced IP.In admin panel in client info (IP log) I also see 2 ip's, although I set limit for 1 IP. Limit doesn't work. For some reason, the author closes the issues about IP limit as solved, although that problem is actual.
The author, please help us solve this problem 🫶
Version of 3x-ui
x-ui log reports or xray log
@pr381s commented on GitHub (Nov 13, 2023):
I can confirm all of that
@somebodywashere commented on GitHub (Nov 13, 2023):
All that you write above is not an evidance that it doesn't work. Please check the fail2ban.log in your OS logs' folder.
@sadjad1011001 commented on GitHub (Dec 13, 2023):
2023-12-13 14:07:33,191 fail2ban.utils [93304]: ERROR 7f03e1b66ca8 -- stderr: '/bin/sh: iptables: No such file or directory'
2023-12-13 14:07:33,191 fail2ban.utils [93304]: ERROR 7f03e1b66ca8 -- stderr: "/bin/sh: -c: line 1: syntax error near unexpected token
newline'" 2023-12-13 14:07:33,191 fail2ban.utils [93304]: ERROR 7f03e1b66ca8 -- stderr: "/bin/sh: -c: line 1:-A f2b-3x-ipl -j '"2023-12-13 14:07:33,191 fail2ban.utils [93304]: ERROR 7f03e1b66ca8 -- returned 1
2023-12-13 14:07:33,192 fail2ban.actions [93304]: ERROR Failed to execute ban jail '3x-ipl' action '3x-ipl' info 'ActionInfo({'ip': '5.160.101.50', 'family': 'inet4', 'fid': <function Actions.ActionInfo. at 0x7f03e1bf3158>, 'bantime': 600, 'F-': {'matches': [('', '2023/12/13 14:06:13', ' [LIMIT_IP] Email = Ali || SRC = 5.160.101.50'), '2023/12/13 14:06:53 [LIMIT_IP] Email = Ali || SRC = 5.160.101.50', '2023/12/13 14:07:23 [LIMIT_IP] Email = Ali || SRC = 5.160.101.50', '2023/12/13 14:07:33 [LIMIT_IP] Email = Ali || SRC = 5.160.101.50'], 'failures': 4, 'user': 'Ali ', 'ip4': '5.160.101.50'}, 'raw-ticket': <function Actions.ActionInfo. at 0x7f03e1bf37b8>})': Error starting action Jail('3x-ipl')/3x-ipl: 'Script error'
2023-12-13 14:07:43,124 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:07:43
2023-12-13 14:08:13,158 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:08:13
2023-12-13 14:08:33,182 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:08:33
2023-12-13 14:08:43,193 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:08:43
2023-12-13 14:09:03,217 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:09:03
2023-12-13 14:09:53,274 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:09:53
2023-12-13 14:10:03,286 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:10:03
2023-12-13 14:10:03,286 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:10:03
2023-12-13 14:10:03,353 fail2ban.actions [93304]: WARNING [3x-ipl] 5.160.101.50 already banned
2023-12-13 14:10:33,319 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:10:33
2023-12-13 14:10:33,319 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:10:33
2023-12-13 14:10:53,343 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:10:53
2023-12-13 14:10:53,343 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:10:53
2023-12-13 14:11:03,355 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:11:03
2023-12-13 14:11:03,356 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:11:03
2023-12-13 14:11:03,417 fail2ban.actions [93304]: NOTICE [3x-ipl] Ban 5.113.98.200
2023-12-13 14:11:03,422 fail2ban.utils [93304]: ERROR 7f03e1bed8a0 -- exec: -I f2b-3x-ipl 1 -s 5.113.98.200 -j
echo "$(date +"%Y/%m/%d %H:%M:%S") BAN [Email] = Ali [IP] = 5.113.98.200 banned for 600 seconds." >> /var/log/3xipl-banned.log
2023-12-13 14:11:03,422 fail2ban.utils [93304]: ERROR 7f03e1bed8a0 -- stderr: "/bin/sh: -c: line 0: syntax error near unexpected token
newline'" 2023-12-13 14:11:03,422 fail2ban.utils [93304]: ERROR 7f03e1bed8a0 -- stderr: "/bin/sh: -c: line 0:-I f2b-3x-ipl 1 -s 5.113.98.200 -j '"2023-12-13 14:11:03,422 fail2ban.utils [93304]: ERROR 7f03e1bed8a0 -- returned 1
2023-12-13 14:11:03,426 fail2ban.utils [93304]: ERROR 7f03e1bcf988 -- exec: -n -L | grep -q 'f2b-3x-ipl[ \t]'
2023-12-13 14:11:03,426 fail2ban.utils [93304]: ERROR 7f03e1bcf988 -- stderr: "/bin/sh: -c: line 0: syntax error near unexpected token
|'" 2023-12-13 14:11:03,427 fail2ban.utils [93304]: ERROR 7f03e1bcf988 -- stderr: "/bin/sh: -c: line 0:-n -L | grep -q 'f2b-3x-ipl[ \t]''"2023-12-13 14:11:03,427 fail2ban.utils [93304]: ERROR 7f03e1bcf988 -- returned 1
2023-12-13 14:11:03,427 fail2ban.CommandAction [93304]: ERROR Invariant check failed. Trying to restore a sane environment
2023-12-13 14:11:03,431 fail2ban.utils [93304]: ERROR 7f03e1b87ab0 -- exec: -N f2b-3x-ipl
-A f2b-3x-ipl -j
-I -p -j f2b-3x-ipl
2023-12-13 14:11:03,432 fail2ban.utils [93304]: ERROR 7f03e1b87ab0 -- stderr: '/bin/sh: iptables: No such file or directory'
2023-12-13 14:11:03,432 fail2ban.utils [93304]: ERROR 7f03e1b87ab0 -- stderr: "/bin/sh: -c: line 1: syntax error near unexpected token
newline'" 2023-12-13 14:11:03,432 fail2ban.utils [93304]: ERROR 7f03e1b87ab0 -- stderr: "/bin/sh: -c: line 1:-A f2b-3x-ipl -j '"2023-12-13 14:11:03,432 fail2ban.utils [93304]: ERROR 7f03e1b87ab0 -- returned 1
2023-12-13 14:11:03,432 fail2ban.actions [93304]: ERROR Failed to execute ban jail '3x-ipl' action '3x-ipl' info 'ActionInfo({'ip': '5.113.98.200', 'family': 'inet4', 'fid': <function Actions.ActionInfo. at 0x7f03e1bf3158>, 'bantime': 600, 'F-': {'matches': [('', '2023/12/13 14:10:03', ' [LIMIT_IP] Email = Ali || SRC = 5.113.98.200'), '2023/12/13 14:10:33 [LIMIT_IP] Email = Ali || SRC = 5.113.98.200', '2023/12/13 14:10:53 [LIMIT_IP] Email = Ali || SRC = 5.113.98.200', '2023/12/13 14:11:03 [LIMIT_IP] Email = Ali || SRC = 5.113.98.200'], 'failures': 4, 'user': 'Ali ', 'ip4': '5.113.98.200'}, 'raw-ticket': <function Actions.ActionInfo. at 0x7f03e1bf37b8>})': Error starting action Jail('3x-ipl')/3x-ipl: 'Script error'
2023-12-13 14:12:03,423 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:12:03
2023-12-13 14:12:23,447 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:12:23
2023-12-13 14:13:13,504 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.113.98.200 - 2023-12-13 14:13:13
2023-12-13 14:14:33,595 fail2ban.filter [93304]: INFO [3x-ipl] Found 5.160.101.50 - 2023-12-13 14:14:33