$ prt-get depinst fail2ban
To start fail2ban at next boot edit /etc/rc.conf and add fail2ban. Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will use it. Copy distribution jail.conf to jail.locol;
$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Edit /etc/fail2ban/jail.local, example configuration;
[ssh-iptables] enabled = enable filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"] logpath = /var/log/auth maxretry = 5
Test a filter
# fail2ban-regex /var/log/iptables iptables-ssh.confTools Index
This is part of the c9-doc Manual. Copyright (C) 2018 c9 team. See the file Gnu Free Documentation License for copying conditions.