fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:fail2ban

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:fail2ban [2023/04/01 19:21] – [Installation] adminlinux:fail2ban [2024/11/14 00:04] (current) – [Installation] gsys
Line 1: Line 1:
 ====== fail2ban ====== ====== fail2ban ======
 ===== Installation ===== ===== Installation =====
 +
 <code> <code>
 sudo apt update sudo apt update
 sudo apt install fail2ban sudo apt install fail2ban
 sudo systemctl enable fail2ban sudo systemctl enable fail2ban
-sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local +sudo touch /etc/fail2ban/jail.local 
-sudo systemctl restart fail2ban.service+</code> 
 + 
 +Debian 11 
 +<code> 
 +sudo systemctl start fail2ban.service 
 +sudo systemctl status fail2ban.service 
 +</code> 
 + 
 +Debian 12 
 + 
 +<code> 
 +sudo apt install python3-systemd 
 +</code> 
 + 
 +''sudo nano /etc/fail2ban/jail.conf'' 
 + 
 +<code> 
 +[DEFAULT] 
 +sshd_backend = systemd 
 +</code> 
 + 
 +<code> 
 +sudo systemctl start fail2ban.service 
 +sudo systemctl status fail2ban.service
 </code> </code>
  
 ===== Steuerung ===== ===== Steuerung =====
 +
 <code> <code>
 +sudo systemctl status fail2ban.service
 +sudo systemctl restart fail2ban.service
 sudo fail2ban-client status sshd sudo fail2ban-client status sshd
 sudo fail2ban-client set <jail-name> unbanip <ip> sudo fail2ban-client set <jail-name> unbanip <ip>
linux/fail2ban.1680369670.txt.gz · Last modified: 2024/02/17 19:03 (external edit)