-
Notifications
You must be signed in to change notification settings - Fork 7
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
XIVY-15829 Add an example with NGINX with rate limits and fail2ban #252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,21 @@ | |||
# Fail2Ban configuration file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you really need to add all the fail2ban configuration files. are these not already part of the container itself?
if they are already in the container, then I would not define them here. because they are getting outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are not part of this image. I copied them from the swag image. But here I use the fail2ban image itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry seems that only this nginx-badbots.conf is not here by default. I would remove it. I do not think that this filter helps a lot. The other filters should be inside the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool.
There is also a nginx-limit-req fail2ban jail. If you get rate limitted to often you also get banned ;).
# To use 'nginx-limit-req' jail you should have `ngx_http_limit_req_module`
# and define `limit_req` and `limit_req_zone` as described in nginx documentation
# http://nginx.org/en/docs/http/ngx_http_limit_req_module.html
# or for example see in 'config/filter.d/nginx-limit-req.conf'
[nginx-limit-req]
port = http,https
[Definition] | ||
|
||
logtarget = STDOUT | ||
dbfile = /config/fail2ban/fail2ban.sqlite3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final new line
Please fix the warnings in the nginx log:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be document how we can see the fail2ban logs? docker compose logs fail2ban
bd43003
to
9ffe936
Compare
No description provided.