wrong 2FA OTP Code produces logs without IP #4017

Closed
opened 2026-03-07 19:24:12 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @iBLtz on GitHub (Aug 16, 2019).

While playing with OTP, I noticed that when I typed the wrong OTP, the event was logged, but not the IP.

Could you print the IP in the log, so this could be used by fail2ban?
Could you adapt the sentance , so only one Jail from fail2ban is needed?

Example _:

failregex = ^.*Username or password is incorrect (or 2FA) \. Try again\. IP: <HOST>\. Username:.*$

or would it be prefered to add another Jail for this?

(OK, I think I have to install Rust and commit someday :D )

Originally created by @iBLtz on GitHub (Aug 16, 2019). While playing with OTP, I noticed that when I typed the wrong OTP, the event was logged, but not the IP. Could you print the IP in the log, so this could be used by fail2ban? Could you adapt the sentance , so only one Jail from fail2ban is needed? Example _: ``` failregex = ^.*Username or password is incorrect (or 2FA) \. Try again\. IP: <HOST>\. Username:.*$ ``` or would it be prefered to add another Jail for this? (OK, I think I have to install Rust and commit someday :D )
Author
Owner

@dani-garcia commented on GitHub (Aug 18, 2019):

I think adding this makes sense, but using the same message would be confusing.

@dani-garcia commented on GitHub (Aug 18, 2019): I think adding this makes sense, but using the same message would be confusing.
Author
Owner

@dani-garcia commented on GitHub (May 13, 2020):

Ip is now included in 0807783388

@dani-garcia commented on GitHub (May 13, 2020): Ip is now included in https://github.com/dani-garcia/bitwarden_rs/commit/0807783388343a8ab4035e50f0a542fadfe03423
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#4017