Mehr Sicherheit durch fail2ban: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 56: | Zeile 56: | ||
# journalmatch. See https://github.com/fail2ban/fail2ban/issues/959#issuecomment-74901200 | # journalmatch. See https://github.com/fail2ban/fail2ban/issues/959#issuecomment-74901200 | ||
backend = systemd | backend = systemd | ||
</pre>Dann kann man auch noch das eigene Logging konfigurieren, damit es auch nach systemd-journal loggt: | |||
<code>/etc/fail2ban/fail2ban.d/logging.conf</code><pre> | |||
[DEFAULT] | |||
# Option: logtarget | |||
# Notes.: Set the log target. This could be a file, SYSTEMD-JOURNAL, SYSLOG, STDERR or STDOUT. | |||
# Only one log target can be specified. | |||
# If you change logtarget from the default value and you are | |||
# using logrotate -- also adjust or disable rotation in the | |||
# corresponding configuration file | |||
# (e.g. /etc/logrotate.d/fail2ban on Debian systems) | |||
# Values: [ STDOUT | STDERR | SYSLOG | SYSOUT | SYSTEMD-JOURNAL | FILE ] Default: STDERR | |||
# | |||
logtarget = SYSTEMD-JOURNAL | |||
</pre> | |||
=== allowipv6 Warning === | |||
um das auftauchende Warning <pre> | |||
fail2ban-server[3538]: 2024-01-03 19:21:18,823 fail2ban.configreader [3538]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto' | |||
</pre>loszuwerden, einfach diese Datei anlegen: | |||
<code>/etc/fail2ban/fail2ban.d/ipv6.conf</code><pre> | |||
DEFAULT] | |||
# Option: allowipv6 | |||
# Notes.: Allows IPv6 interface: | |||
# Default: auto | |||
# Values: [ auto yes (on, true, 1) no (off, false, 0) ] Default: auto | |||
allowipv6 = no | |||
</pre> | </pre> | ||
===Konfiguration für SSH=== | ===Konfiguration für SSH=== | ||
Folgendes der Datei hinzufügen:<br> | Folgendes der Datei hinzufügen:<br><code>/etc/fail2ban/jail.local</code> | ||
<pre> | <pre> | ||
[ssh] | [ssh] | ||
| Zeile 81: | Zeile 112: | ||
===Konfiguration für Pure-FTPd=== | ===Konfiguration für Pure-FTPd=== | ||
Folgendes der Datei hinzufügen:<br> | Folgendes der Datei hinzufügen:<br><code>/etc/fail2ban/jail.local</code> | ||
<pre> | <pre> | ||
# | # | ||
| Zeile 97: | Zeile 127: | ||
</pre> | </pre> | ||
<code>/etc/fail2ban/filter.d/pure-ftpd.conf</code> | |||
<pre> | <pre> | ||
# Fail2Ban configuration file | # Fail2Ban configuration file | ||
| Zeile 384: | Zeile 414: | ||
[[Kategorie:Ubuntu]] | [[Kategorie:Ubuntu]] | ||
[[Kategorie:Security]] | [[Kategorie:Security]] | ||
[[Kategorie:RaspberryPiOS]] | |||
{{#related:Fail2ban-Dockerized: SSH und andere Dienste absichern per Docker Compose}} | |||