Back to search

fail2ban jail.local

config security

Fail2ban jail configuration for SSH protection

/etc/fail2ban/jail.local

Required Packages

sudo apt install -y fail2ban

Default Settings

Duration of ban (e.g. 10m, 1h, 1d)

Time window for counting failures

SSH Jail

Port name or number

Path to the log file to monitor

Action to take when banning

Generated Config — /etc/fail2ban/jail.local

[DEFAULT] bantime = 10m findtime = 10m maxretry = 5 [sshd] enabled = true port = ssh filter = sshd