-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Failtoban Increment Counter Issue #442
Comments
this is likely a bug, sorry too busy these days |
I found the issue in the Fail2Ban plugin code. A generic SFTP client opens and closes the connection to list directories, so EOF is not an error. I fixed it with this test code:
|
looked into your logs carefully, seems it is by design i would say, the logs is confusing anyway |
Hi, Now, I only get banned if I enter the wrong password or if I use an undeclared source username in the Kubernetes pipes. |
it bans per ip basis, what did you see about your ip? |
Actually, my IP was getting banned simply by opening VSCode, because I had an SFTP/FTP extension that was performing a directory listing at regular intervals. Specifically, the error was logged as:
So, the error counter for that IP kept increasing. I’m not entirely sure if this was an internal issue of extension, but the ban would consistently occur right after opening VSCode every time. In my opinion, the issue was caused by the extension repeatedly opening the connection to check for the presence of folders and then closing it (whether it was done regularly or irregularly), which seemed to trigger the problem each time. |
thanks after carefully review, i believe this is your case
|
hi @valentino-90 could you please share your sftp vscode ext, i am not able to repro |
I think it would be enough to use any SSH client and terminate the connection by simulating an EOF. In any case, if it helps you, the extension was XPLOT - SSH Tools. |
Hi,
i have SSHPiper running in a Kubernetes pod. With an SFTP client that refreshes the directory tree every 5 seconds, I get this error despite using the correct credentials. I am not banned, but the counter increments, and at the first real error, I actually get banned.
Let me know if you'd like further adjustments or clarifications!
The text was updated successfully, but these errors were encountered: