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

Plugin not blocking the IP if 401 status code #142

Open
Chris-luiz-16 opened this issue Sep 6, 2024 · 1 comment
Open

Plugin not blocking the IP if 401 status code #142

Chris-luiz-16 opened this issue Sep 6, 2024 · 1 comment

Comments

@Chris-luiz-16
Copy link

Chris-luiz-16 commented Sep 6, 2024

I have a frontend docker container with labels written as follows. I'm expecting the plugin to block the Ip if there is any 401 code is detected in traefik json logs. Unfortunately the fail2ban plugin is not blocking the IP. Is there anything wrong in my traefik labels configuration

  labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik-public"
        - "traefik.http.routers.rvm-accept-angularweb.rule=Host(`example.com`) || Host(`www.example.com`)"
        - "traefik.http.routers.rvm-accept-angularweb.entrypoints=websecure"
        - "traefik.http.routers.rvm-accept-angularweb.tls=true"
        - "traefik.http.services.rvm-accept-angularweb.loadbalancer.sticky=true"
        - "traefik.http.services.rvm-accept-angularweb.loadbalancer.server.port=443"
        - "traefik.http.services.rvm-accept-angularweb.loadbalancer.server.scheme=https"
        - "traefik.http.services.rvm-accept-angularweb.loadbalancer.sticky.cookie.httponly=true"
        - "traefik.http.routers.fail2ban-local.rule=Host(`example.com`) || Host(`www.example.com`)"
        - "traefik.http.routers.fail2ban-local.middlewares=fail2ban-local"
        - "traefik.http.middlewares.fail2ban-local.plugin.fail2ban-local.rules.enabled=true"
        - "traefik.http.middlewares.fail2ban-local.plugin.fail2ban-local.rules.bantime=10m"
        - "traefik.http.middlewares.fail2ban-local.plugin.fail2ban-local.rules.findtime=3m"
        - "traefik.http.middlewares.fail2ban-local.plugin.fail2ban-local.rules.maxretry=2"
        - "traefik.http.middlewares.fail2ban-local.plugin.fail2ban-local.rules.statuscode=401"
@tomMoulard
Copy link
Owner

Hello @Chris-luiz-16,

Thanks for your interest in this Traefik plugin !

I've released https://github.com/tomMoulard/fail2ban/releases/tag/v0.8.2 with an intensive logging approach. Can you try again your issue with the latest version and tell me if it's still relevant ?

Thanks !

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