-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezone in the Logs is missing (fail2ban is not working) #574
Comments
Well I played with it again today. I am living in Germany (UTC+1). if i compensate the findtime from fail2ban, then it is working workaround : Timezone in the Logs would still be great :) |
The log date format is printed here: https://github.com/dani-garcia/bitwarden_rs/blob/master/src/main.rs#L77. We could add We could also extract that to a config option if there was interest in using weird date formats, but I'm not sure if that would be worth it. |
I think to print the timezone would When I was printing the date from inside the container, the time was correctly returned. when the log produced some lines, it was the UTC time (my time - 1). Did I configured something wrong? |
Is it possible to update the documentation of the fail2ban page with info to using it with a fail2ban container? I want to use the crazymax container of fail2ban with traefik. |
To change the timezone within the container you can run the container to have a TZ environment variable. Or you can pass the hosts timezone by using volumes: Also, fail2ban supports many time formats, and can try to auto guess it. |
just tested a thing
|
@DoTheEvo I think you need the |
Also, there now is an option to customize the timestamp if you need too see: https://github.com/dani-garcia/bitwarden_rs/blob/2f3e18caa98271f9273e39e999f55635975091aa/.env.template#L57 |
Look like this was fixed in f6bd8b3 by adding the |
Hi,
I am trying to set up Fail2ban (from Letsencrypt image) with Bitwarden. Everything is in place and is almost working.
Fail2ban is not banning because the Logs are without timestamp (if i am correctly analyzing the problem)
because of this, it just
Ignore line since time 1565803439.0 < 1565810639.6700468 - 14400
If i copy the line
[2019-08-14 19:23:59 UTC][bitwarden_rs::error][ERROR] Username or password is incorrect. Try again. IP: 84.46.46.XX. ...
(notice the "UTC" in the timestamp) several time in the bitwarden Logs, fail2ban succeed in banning the IP :)Anyway to change the time output?
thx!
The text was updated successfully, but these errors were encountered: