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

Fail2ban regex trigger #74

Closed
ippocratis opened this issue Jun 27, 2022 · 3 comments
Closed

Fail2ban regex trigger #74

ippocratis opened this issue Jun 27, 2022 · 3 comments

Comments

@ippocratis
Copy link
Contributor

ippocratis commented Jun 27, 2022

I am exposing my librephotos instance bethind a reverse proxy using caddy webserver
I'm creating log files for it and monitor the logs with fail2ban

I use a regex filter

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

And set the thresold to 3 failed attempts

Looks like simply opening photos in uhuruphotos triggers the reggex filter and bans my IP so I cant use the app anymore until I unban it

Any ideas about how I would come over this apreciated

I know not directly related to the app so you could close this issue if you think its completely irrelevant

Thanks

@savvasdalkitsis
Copy link
Owner

Hm yea blindly blocking 4xx is appealing (I've done that too in the past) but can break apps that rely on these responses as a signal to refresh their access tokens.

You could perhaps allow the app user agent?

@ippocratis
Copy link
Contributor Author

ippocratis commented Jun 28, 2022

Looks like
failregex = ^<HOST>.+\s(400|401)\s.+
Is not triggering any bans while just using the app
Only in failed logins as expected
Not sure why though
anyway
Thanks

Source

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