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

Using failregex to ban using response's data #40

Open
phirestalker opened this issue Aug 28, 2021 · 5 comments
Open

Using failregex to ban using response's data #40

phirestalker opened this issue Aug 28, 2021 · 5 comments
Labels
kind/enhancement New feature or request

Comments

@phirestalker
Copy link

phirestalker commented Aug 28, 2021

Is there a way to ban using a failregex filter on an access log line?

I had fail2ban on my host protecting the docker proxy instance when i was using nginx-proxy. Here is the line from my custom filter

failregex = ^.*\s<HOST>.*"(GET|POST).*" (404|444|403|400) .*$

EDIT:

Does this plugin only ban according to urlregexp and if I leave it blank it blocks all access?

@tomMoulard
Copy link
Owner

For now, there is no way to do this with this plugin.
But since the can be a new feature to support, I'll add the correct label the enhance the plugin :)

@tomMoulard tomMoulard added the kind/enhancement New feature or request label Aug 28, 2021
@tomMoulard tomMoulard changed the title using failregex to ban multiple 400 errors using failregex to ban using request's data Aug 28, 2021
@tomMoulard tomMoulard changed the title using failregex to ban using request's data Using failregex to ban using request's data Aug 28, 2021
@tomMoulard tomMoulard changed the title Using failregex to ban using request's data Using failregex to ban using response's data Aug 28, 2021
@phirestalker

This comment has been minimized.

@tomMoulard

This comment has been minimized.

@phirestalker
Copy link
Author

phirestalker commented Aug 29, 2021 via email

@phirestalker
Copy link
Author

I had an unrelated question about the plugin's development.
How did you set up the test environment for developing this plugin?
Did you use some kind of virtual environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants