-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Update run to make fail2ban.local consistent with jail.local #508
base: master
Are you sure you want to change the base?
Conversation
Updating /config/fail2ban/jail.local will update its copy in /etc/fail2ban/. Users would expect the same behavior with fail2ban.local
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.
Thanks for opening this pull request! Be sure to follow the pull request template!
I am a bot, here are the test results for this PR:
|
I am a bot, here are the test results for this PR:
|
It's there a specific reason you're trying to modify it? It wasn't designed to be user configurable as other init steps depend on it and modifications would likely break things. |
I was trying to change |
We never make fail2ban.local available in the config folder, only jail.local. And our docs state jail.local is user editable as well as any existing action or filter via user created .local files. Our init and services expect the logs in the defined location. We even have logrotate set up. We don't intend to make that user configurable. |
You're right. SWAG doc says "create .local files with the same name and edit those because .conf files get overwritten when the actions and filters are updated". I extrapolated that to include fail2ban.conf and expected adding fail2ban.local would behave the same. I suspect many will extrapolate the same. What's the impact of moving fail2ban log location? Beside logrotate, what other things might be tied to the log location? If it's just logrotate, I'm not concerned logrotate has the wrong fail2ban log location because the new location has its own retention/rotation policy. NGINX log location is easier to change: just add |
You're the first person to ask about this in 8 years so I would argue it is not a common point of confusion. https://www.linuxserver.io/blog/why-cant-you-just-implement-thing-i-want https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers |
I actually did use the custom script approach mentioned in your second link, but this was only after wasting some time thinking fail2ban.local should work and tracing the root cause to this script. It's doable but it's not as easy or consistent with jail.local. I created this PR even though I already had a workaround because I thought it's a violation of Principle of least astonishment. In the original script,
So, I did the first option. This PR is the second option described in your first link 😄 . I'd argue making things consistent reduces complexity.
|
I am a bot, here are the test results for this PR:
|
Changing it now would be a violation of the KISS principle. |
Updating /config/fail2ban/jail.local will update its copy in /etc/fail2ban/. Users would expect the same behavior with fail2ban.local
Description:
Updating /config/fail2ban/jail.local will update its copy in /etc/fail2ban/. Users would expect the same behavior with fail2ban.local
Benefits of this PR and context:
Users can update the /config/fail2ban/fail2ban.local and it should work like /config/fail2ban/jail.local
How Has This Been Tested?
Source / References: