Fail2ban: diferència entre les revisions

De WikiMar
Salta a la navegació Salta a la cerca
(Es crea la pàgina amb «==Fail2ban when ssh in telnet port== This are no failures in sense of authentication (because login does not take place). But if you will that yet, just copy /etc/fi...».)
 
Línia 1: Línia 1:
==Install Fail2ban on CentOS/Fedora==
Instead of installing with yum install fail2ban, use:
yum install fail2ban-server
systemctl enable fail2ban
systemctl restart fail2ban
Info: http://pkgs.org/centos-7/puias-unsupported-x86_64/fail2ban-server-0.9.2-1.sdl7.noarch.rpm.html
==Fail2ban when ssh in telnet port==
==Fail2ban when ssh in telnet port==


This are no failures in sense of authentication (because login does not take place).
This are no failures in sense of authentication (because login does not take place).


But if you will that yet, just copy /etc/filter.d/sshd.conf into /etc/filter.d/sshd.local and add following to the failregex:
But if you will that yet, just copy /etc/fail2ban/filter.d/sshd.conf into /etc/fail2ban/filter.d/sshd.local and add following to the failregex:


  ^%(__prefix_line)sBad protocol version identification '.*' from <HOST> port \d+\s*$
  ^%(__prefix_line)sBad protocol version identification '.*' from <HOST> port \d+\s*$

Revisió del 21:49, 31 març 2016

Install Fail2ban on CentOS/Fedora

Instead of installing with yum install fail2ban, use:

yum install fail2ban-server
systemctl enable fail2ban
systemctl restart fail2ban

Info: http://pkgs.org/centos-7/puias-unsupported-x86_64/fail2ban-server-0.9.2-1.sdl7.noarch.rpm.html


Fail2ban when ssh in telnet port

This are no failures in sense of authentication (because login does not take place).

But if you will that yet, just copy /etc/fail2ban/filter.d/sshd.conf into /etc/fail2ban/filter.d/sshd.local and add following to the failregex:

^%(__prefix_line)sBad protocol version identification '.*' from <HOST> port \d+\s*$
^%(__prefix_line)sDid not receive identification string from <HOST>\s*$


https://github.com/fail2ban/fail2ban/issues/1284