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

Banning based on forwarded IP #84

Open
stashymane opened this issue Oct 16, 2023 · 4 comments
Open

Banning based on forwarded IP #84

stashymane opened this issue Oct 16, 2023 · 4 comments
Labels
kind/proposal a proposal that needs to be discussed.

Comments

@stashymane
Copy link

As noted in this discussion, fail2ban currently only uses the request's IP for banning. This makes it impossible to properly ban IPs when behind a proxy, like Cloudflare.
A configuration option to pull the IP from a request header or other source would be ideal.

@tomMoulard tomMoulard added the kind/proposal a proposal that needs to be discussed. label Oct 18, 2023
@fliot
Copy link

fliot commented Dec 21, 2023

100% agree on this very important feature.

@zhangjunjie6b
Copy link

I have to turn off the proxy function of Cloudflare for the same issue

@johnbizokk
Copy link

Indeed! Without support for blocking the IP address from the x-forwarded-for header, the plugin is non-functional when the traefik is behind a proxy (such as Cloudflare).

@tomMoulard
Copy link
Owner

Indeed this could be a very important feature. It would be nice to have a configuration like the source criterion of the InFlightReq middleware.
I'll be waiting for a PR until I'll do it myself in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal a proposal that needs to be discussed.
Projects
None yet
Development

No branches or pull requests

5 participants