fail2ban.php
- Pfad:
public/static-docs/online/module/fail2ban.php - Namespace: -
- Zeilen: 30 | Größe: 597 Bytes
- Geändert: 2025-12-19 23:56:40 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Code
<section>
<h2>5. Fail2Ban</h2>
<h3>5.1 Installation</h3>
<pre><code>apt-get install -y fail2ban</code></pre>
<h3>5.2 Konfiguration</h3>
<p>Datei: <code>/etc/fail2ban/jail.local</code></p>
<pre><code>[DEFAULT]
bantime = 1h
findtime = 10m
maxretry = 3
ignoreip = 127.0.0.1/8
[sshd]
enabled = true
port = 2022
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
bantime = 1h</code></pre>
<h3>5.3 Service starten</h3>
<pre><code>systemctl enable fail2ban
systemctl restart fail2ban</code></pre>
<h3>5.4 Gebannte IPs anzeigen</h3>
<pre><code>fail2ban-client status sshd</code></pre>
</section>