Po instalaci balíčku postačí přidat jen jednu akci a patřičnou tabulku do PF.
cd /usr/ports/security/py-fail2ban; make install clean
./action.d/pf.conf:
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = pfctl -t fail2ban -T add
actionunban = pfctl -t fail2ban -T delete `pfctl -t fail2ban -T show 2>/dev/null | grep`
[Init]
port = ssh
localhost = 127.0.0.1
============================================================
/etc/pf.conf:
tablepersist
block in on $ext_if from
Žádné komentáře:
Okomentovat