Skip to content
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

traefik 2.1 not working (can't set timezone in traefik accesslogs [always UTC]) #35

Closed
bf8392 opened this issue Jan 16, 2020 · 8 comments

Comments

@bf8392
Copy link

bf8392 commented Jan 16, 2020

There are multiple closed issues about traefik, and I read most of them...I still can't figure out, what I'm doing wrong...I use traefik with basic auth on docker containers...I followed exactly your steps...ssh is working, traefik not...it siply shows no action in the logs...except that it is adding the traefik access log...please help!

@bf8392
Copy link
Author

bf8392 commented Jan 16, 2020

Tried this one: but is not working...I tried it with json and non-json log...no difference...
fail2ban/fail2ban#2558

@bf8392 bf8392 changed the title traefik 2.1 not working (can't set timezone) traefik 2.1 not working (can't set timezone in traefik accesslogs [always UTC]) Jan 16, 2020
@bf8392
Copy link
Author

bf8392 commented Jan 16, 2020

output of accesslog:

192.168.100.110 - - [16/Jan/2020:20:31:43 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 1 "backend@docker" - 0ms
192.168.100.110 - - [16/Jan/2020:20:31:44 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 2 "backend@docker" - 0ms
192.168.100.110 - - [16/Jan/2020:20:32:06 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 3 "backend@docker" - 0ms
192.168.100.110 - - [16/Jan/2020:20:38:46 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 1 "backend@docker" - 0ms
192.168.100.110 - - [16/Jan/2020:20:38:47 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 2 "backend@docker" - 2ms
192.168.100.110 - - [16/Jan/2020:20:38:59 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 3 "backend@docker" - 0ms
192.168.100.110 - - [16/Jan/2020:20:39:02 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 4 "backend@docker" - 0ms

@crazy-max
Copy link
Owner

Hi @bd8392,

Can you try this failregex:

failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$

@bf8392
Copy link
Author

bf8392 commented Jan 17, 2020

works perfectly! thanks! =) I spend hours with it! Was really great help =)

@bf8392
Copy link
Author

bf8392 commented Jan 17, 2020

ok this works a little to good...it bans me after the first wrong password, but i set 3 attempts in the variables...it also shows that it found three attempts...

Edit: Found the "error": When I insert nothing an click ok, he finds three false attempts. This does not happen, when I enter Information in the two fields -> Than it finds just one failed attempt. If I enter only one filed, it finds two failed attempts and so on...i setted the maxretry in jails to 5. This helps not running to early in the "issue"

@bf8392 bf8392 reopened this Jan 17, 2020
@crazy-max
Copy link
Owner

@bd8392 Can you post log samples please?

@crazy-max
Copy link
Owner

@bd8392 This issue is linked to Traefik and not directly to Fail2ban or this image. You can get support on https://github.com/containous/traefik

@bf8392
Copy link
Author

bf8392 commented Jan 19, 2020

Ok thank you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants