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

change F2B configs: made config more aggressive #3243

Merged
merged 6 commits into from Apr 11, 2023

Conversation

georglauterbach
Copy link
Member

@georglauterbach georglauterbach commented Apr 10, 2023

Description

Adjust F2B config. Made Postfix & Postfix-SASL more aggressive (switched mode to aggressive). Also increased bantime & findtime and reduced maxretries, as proposed in #3178.

I have been running a configuration that is even more aggressive on my personal instance, and never had any problems. I believe this change to be worthwhile and justified :)

Fixes #3178

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@georglauterbach georglauterbach enabled auto-merge (squash) April 10, 2023 21:40
@georglauterbach
Copy link
Member Author

ATTENTION: Auto-Merge is enabled :)

@casperklein
Copy link
Member

LGTM 👍 Just two things:

For completeness and documentation: could you explain/give an example, what adding mode=aggressive does (on top) compared to not using it. "Being more aggressive" is a bit vague.

In the linked issue you mentioned a dedicated Postscreen jail. Does mode=aggressive already handle that or was there an other reason you omitted it?

PS: IMO findtime could also be 1w.

@georglauterbach
Copy link
Member Author

For completeness and documentation: could you explain/give an example, what adding mode=aggressive does (on top) compared to not using it. "Being more aggressive" is a bit vague.

Does that help: https://github.com/fail2ban/fail2ban/blob/27294c4b9ee5d5568a1d5f83af744ea39d5a1acb/config/filter.d/postfix.conf#L58? It basically matches more lines. Do you want to add this to the file too?

In the linked issue you mentioned a dedicated Postscreen jail. Does mode=aggressive already handle that or was there an other reason you omitted it?

Yes: mode=aggressive already handles that.

PS: IMO findtime could also be 1w.

I took d because it's consistent with findtime 😂

@casperklein
Copy link
Member

Does that help: fail2ban/fail2ban@27294c4/config/filter.d/postfix.conf#L58? It basically matches more lines. Do you want to add this to the file too?

Doesn't hurt I think 👍

PS: IMO findtime could also be 1w.

I took d because it's consistent with findtime 😂

You misunderstood. I meant 7d or 1w. Currently it's 1d.

@georglauterbach
Copy link
Member Author

georglauterbach commented Apr 11, 2023

Does that help: fail2ban/fail2ban@27294c4/config/filter.d/postfix.conf#L58? It basically matches more lines. Do you want to add this to the file too?

Doesn't hurt I think 👍

👍🏼

PS: IMO findtime could also be 1w.

I took d because it's consistent with findtime 😂

You misunderstood. I meant 7d or 1w. Currently it's 1d.

Oh, I see :D I will adjust the PR.

EDIT: Done.

@github-actions
Copy link
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: f79d4fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration (file) kind/improvement Improve an existing feature, configuration file or the documentation service/security/fail2ban
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Postscreen attack vectors should be banned by F2B in the default config
3 participants