Fail2ban on CentOS 7 to protect SSH – Part II

This article is split from previous one addressing OpenVZ platform due to compatibility issue on ipset, or the cases that iptables-services must be used.

Part II – Fail2ban with iptables-services
  1. Install fail2ban from EPEL repo.
  2. Deal with SELinux, there are two options to choose from.
    • Update SELinux Policy
    • OR Disable SELinux
  3. Configure fail2ban, we prefer iptables-services here.
    Put the following lines in /etc/fail2ban/jail.d/sshd.local.
  4. Enable and start fail2ban.


Nov 3, 2018 @ 11:14

3 thoughts on “Fail2ban on CentOS 7 to protect SSH – Part II”

Leave a Reply

Your email address will not be published. Required fields are marked *

Please calculate * Time limit is exhausted. Please reload CAPTCHA.