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

Cannot make the fail2ban setup guide work with systemd journal #242

Open
402PaymentReq opened this issue Jul 30, 2023 · 0 comments
Open

Comments

@402PaymentReq
Copy link

Debian 12.1 (systemd journal is default)
fail2ban version 1.0.2

Trying to make fail2ban filter + jail work.
Shadowsocks authentication errors in logs match filter regex correctly. fail2ban is up, nothing unusual in logs. But "fail2ban-client status shadowsocks-libev" fails to reflect failures to authenticate (sshd jail does work correctly, though)

  • Changes in jail.conf:

[DEFAULT]
backend = systemd

  • Shadowsocks filter:

[INCLUDES]
before = common.conf

[Definition]
_daemon = ss-server
failregex = ^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s+failed to handshake with : authentication error$
ignoreregex =
datepattern = %%Y-%%m-%%d %%H:%%M:%%S
journalmatch = _SYSTEMD_UNIT=shadowsocks-libev.service

  • Shadowsocks jail:

[shadowsocks-libev]
enabled = true
filter = shadowsocks-libev
port = 8839

maxretry = 3
findtime = 3600
bantime = 3600

What am I doing wrong?
Thanks!

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

No branches or pull requests

1 participant