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

fail2ban: add filter for sshd with socklog #44977

Closed
wants to merge 1 commit into from

Conversation

dexgs
Copy link
Contributor

@dexgs dexgs commented Jul 11, 2023

The sshd filter distributed with fail2ban does not work properly with socklog out of the box.

Ideally, socklog would have comprehensive support upstream, but the configuration to make it work with just sshd is very straighforward and the fail2ban package should be able to protect sshd out of the box with void's preferred syslog implementation.

This change doesn't override any of fail2ban's default configuration. It adds a new filter defined in sshd-socklock.conf which inherits from the default sshd.conf and overrides only what is needed to make it work.

Testing the changes

  • I tested the changes in this PR: YES

The sshd filter distributed with fail2ban does not work properly with
socklog out of the box.

Ideally, socklog would have comprehensive support upstream, but the
configuration to make it work with *just* sshd is very straighforward and
the fail2ban package should be able to protect sshd out of the box with
void's preferred syslog implementation.

This change doesn't override any of fail2ban's default configuration. It
adds a new filter defined in `sshd-socklock.conf` which inherits from
the default `sshd.conf` and overrides only what is needed to make it work.
@MeganerdNL
Copy link
Contributor

MeganerdNL commented Jul 11, 2023

I am unable to test this, as I'm not currently using socklog.
I switched to rsyslog because there seems to be no working filters for socklog for the things I used with socklog (postfix/sasl, dovecot and sshd) because of the different logging style. This only solves sshd, so it's a beginning, but there might be many more.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Oct 10, 2023
@github-actions github-actions bot closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants