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

Release 1.2.0 #27

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Release 1.2.0 #27

wants to merge 10 commits into from

Conversation

WKnak
Copy link
Owner

@WKnak WKnak commented Jun 28, 2024

1.2.0 - Big merge from Dev to Main, including:

  • Compatibility with Python3.5 (mostly interpolated print(f) adjustments)
  • Created a preferences/config file settings under /etc/fail2ban/ folder
  • Some of the preferences in the arguments can now be persisted in the preferences
  • Created a new preference for the CIDR maximum range (valid from /18 to /30)
  • Compatibility with Fail2Ban old versions like 0.11.1 (there is a different way of getting banned status)
  • Code refactored into classes and helpers

@WKnak
Copy link
Owner Author

WKnak commented Jun 28, 2024

Tests:

  • Ubuntu 16.04.7, Python 3.5.2, fail2ban 0.9.3
    (works fine, but this f2b client don't implements a way of getting ban status, a warning is thrown and works)
  • Ubuntu 20.04.6, Python 3.8.10, fail2ban 0.11.1 (OK)
  • Ubuntu 20.04.6, Python 3.8.10, fail2ban 1.1.0.1 (OK)

@WKnak WKnak requested a review from pbiering June 28, 2024 18:38
@pbiering
Copy link
Collaborator

@WKnak : will review this weekend

@pbiering
Copy link
Collaborator

@WKnak : introduction of a mandatory hardcoded config file is unexpected, especially that it tries to write by default:

Error was detected while saving /etc/fail2ban/fail2ban-block-ip-range.conf: [Errno 2] No such file or directory: '/etc/fail2ban/fail2ban-block-ip-range.conf'
Error was detected while reading /etc/fail2ban/fail2ban-block-ip-range.conf: [Errno 2] No such file or directory: '/etc/fail2ban/fail2ban-block-ip-range.conf'. Hard coded values will be applied

(this should be btw. not an error, only a notice, but only if specified)

BW: I would not change default behavior

  • make use of config file optional by option, e.g. "-c|--config CONFIGFILE"
  • add an explicit option to write settings to a config file taken from the provided command line options, e.g. "--write-config", only working in conjunction with explicit CONFIGFILE given - automatic save can be very unexpected
  • suggestion: on write CONFIG test also whether directory is writable at all before trying
  • side works for new release
    • extend online help for COUNTLIMIT, FILE, MAXAGE (and for the 2 new options suggested above)
    • update version in the contrib SPEC file

Adding the config file feature btw. I would consider updating the version to 2.x

@WKnak
Copy link
Owner Author

WKnak commented Jul 10, 2024

Still need to make the changes here, didn't find the time. 😐

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

Successfully merging this pull request may close these issues.

2 participants