Created by: ston1th 2019-05-29 18:20:21
Updated by: ston1th 2019-09-10 21:20:27
Visibility: Public

OpenBSD Packet Filter

SSH Fail2Ban

table <ssh-ban> persist
block in quick proto tcp from <ssh-ban> to any
pass in on egress proto tcp to any port ssh flags S/SA keep state \
  (max-src-conn 5, max-src-conn-rate 5/5, overload <ssh-ban> flush global)

Expiry cronjob (24h):

pfctl -t ssh-ban -T expire 86400