Cockpit 用 Fail2Ban フィルター
Cockpit 用 Fail2Ban フィルターを作成しました。
フィルター
「/etc/fail2ban/filter.d/cockpit.conf」
[Definition]
failregex = pam_unix\(cockpit:auth\): authentication failure; logname=.* uid=.* euid=.* tty=.* ruser=.* rhost=<HOST>
[Init]
journalmatch = SYSLOG_IDENTIFIER=cockpit-session
設定
「/etc/fail2ban/jail.d/local.conf」
[cockpit]
enabled = true
backend = systemd
bantime = 1h
findtime = 1d
maxretry = 2
テスト
# fail2ban-regex systemd-journal cockpit.conf --print-all-matched