Navigace

fail2ban

Howto protect Linux server - Quick install fail2ban

Install fail2ban:

apt-get install fail2ban

Copy configuration file to right place:

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Edit configuration file

[DEFAULT]
...
bantime  = 600 # = 10min (bigger = better)
...
banaction = iptables-allports


[ssh]
enabled  = true

[ssh-ddos]
enabled  = true

Restart service:

service fail2ban restart

Check iptables:

iptables -L -n

Log file:

Subscribe to fail2ban