User Tools

Site Tools


fail2ban

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
fail2ban [2019-10-01 19:39:47]
mi [Save custom config]
fail2ban [2020-12-03 12:12:59] (current)
mi
Line 57: Line 57:
   ssh -p $port -i $id root@$host 'cd /​etc/​fail2ban && find . -type f -name "​*.local"'​ \   ssh -p $port -i $id root@$host 'cd /​etc/​fail2ban && find . -type f -name "​*.local"'​ \
   | rsync -e "ssh -p $port -i $id" -avi -R --files-from=- $host:/​etc/​fail2ban/​ $dest/​fail2ban/​$host/​   | rsync -e "ssh -p $port -i $id" -avi -R --files-from=- $host:/​etc/​fail2ban/​ $dest/​fail2ban/​$host/​
 +
 +===== Unban =====
 +
 +<code sh>
 +# ip=194.230.155.162
 +# jail=dovecot ​        # from "​Subject:​ [Fail2Ban] dovecot: banned 194.230.155.162 ..."
 +
 +# ipset -n list
 +...
 +f2b
 +...
 +
 +# ipset list f2b | grep $ip
 +194.230.155.162 timeout 77556
 +
 +# fail2ban-client -v -v set $jail unbanip $ip
 +INFO   ​Loading configs for fail2ban under /​etc/​fail2ban ​
 +DEBUG  Reading configs for fail2ban under /​etc/​fail2ban ​
 +DEBUG  Reading config files: /​etc/​fail2ban/​fail2ban.conf
 +INFO     ​Loading files: ['/​etc/​fail2ban/​fail2ban.conf'​]
 +INFO     ​Loading files: ['/​etc/​fail2ban/​fail2ban.conf'​]
 +INFO   Using socket file /​var/​run/​fail2ban/​fail2ban.sock
 +DEBUG  OK : '​194.230.155.162'​
 +DEBUG  Beautify '​194.230.155.162'​ with ['​set',​ '​dovecot',​ '​unbanip',​ '​194.230.155.162'​]
 +194.230.155.162
 +
 +# ipset list f2b | grep $ip
 +</​code>​
  
 ===== Divers ===== ===== Divers =====
/docs/dokuwiki/data/attic/fail2ban.1569951587.txt.gz ยท Last modified: 2019-10-01 19:39:47 by mi