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

TOOL-5102: please consider suggesting using jail.local instead of jail.conf #1240

Open
duck-rh opened this issue Nov 25, 2021 · 3 comments
Open
Assignees

Comments

@duck-rh
Copy link
Contributor

duck-rh commented Nov 25, 2021

Is your feature request related to a problem? Please describe.
There is no problem.
I'm attempting to triage the remaining custom tests in the Debian package and get what makes sense included upstream.

Describe the solution you'd like
If jail.local is not present, then suggest using it.

Required changes
If jail.local is not present, add a warning like:

ReportSuggestion ${TEST_NO} "Copy /etc/fail2ban/jail.conf to jail.local to prevent it being changed by updates."

Additional context
It might be a Debian specific path.

@d4t4king
Copy link
Contributor

I don't know that copying jail.conf to jail.local is the ideal recommendation. IIUC, settings in jail.local override settings in jail.conf. So one could merely put your customizations in jail.local and ignore all of the extraneous text. Personal preference maybe.

@duck-rh
Copy link
Contributor Author

duck-rh commented Nov 25, 2021

@d4t4king putting your custom settings in the local file is the recommended way in README.Debian but indeed copying the main conffile in the local one is not and would surely be a mess to maintain. Let's update the message to reflect that.

@mboelen
Copy link
Member

mboelen commented Jan 31, 2022

The file jail.local is not specific to Debian as it is listed in the manual. So yes, it might be a good idea to check for it and provide a hint to use that as opposed to making adjustments directly in jail.conf.

So the suggestion could be "Create the file /etc/fail2ban/jail.local and include any of your customizations to override the settings from jail.conf (note: do not copy jail.conf)". This way it clearly specifies what to do and also to avoid make a copy of the original file.

@duck-rh As you are migrating the custom tests, will you make the relevant pull request?

@mboelen mboelen self-assigned this Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants