Fail2ban

From Leo's Notes
Revision as of 21:13, 11 August 2017 by Leo (talk | contribs) (Created page with "Fail2Ban is a program that monitors failed login attempts and automatically blocks access. == Installation == On Fedora, install the fail2ban package. == Configuration == Ma...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 11 August 2017, at 21:13.

Fail2Ban is a program that monitors failed login attempts and automatically blocks access.

Installation

On Fedora, install the fail2ban package.

Configuration

Make any changes to /etc/fail2ban/jail.local. The default settings and the configuration documentation can be viewed at /etc/fail2ban/jail.conf.

I am currently using the following configuration:

[DEFAULT]
#
# Ban hosts in seconds
#
# One month
bantime = 2592000

# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport

ignoreip = 127.0.0.1/8 172.20.1.0/24 96.30.20.0/24 67.227.194.37/23

# 12 hours, 3 fail
findtime = 43200
maxretry = 3

[sshd]
enabled = true

See Also