CentOS 7.x fail2ban

From Notes_Wiki
Revision as of 15:39, 30 December 2017 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>CentOS_7.x_Security_Tools|CentOS 7.x Security Tools</yambe:breadcrumb> =CentOS 7.x fail2ban= To configure fail2ban on CentOS 7.x use: # yum -y install epel...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>CentOS_7.x_Security_Tools|CentOS 7.x Security Tools</yambe:breadcrumb>

CentOS 7.x fail2ban

To configure fail2ban on CentOS 7.x use:

  1. yum -y install epel-release
  2. yum -y install fail2ban
  3. cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
  4. cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
  5. vim /etc/fail2ban/jail.local
    ...
    backend=systemd
    ...
    [sshd]
    enabled = true
    ...
  6. systemctl start fail2ban
  7. systemctl enable fail2ban
  8. fail2ban-client status
  9. fail2ban-client status sshd

There is also older article on fail2ban at Fail2ban

Refer: