Fail2ban on CentOS 7 to protect SSH – Part II

Email this to someoneTweet about this on TwitterShare on FacebookShare on Google+Print this page

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.

 

Oct 5, 2016 @ 12:48
Email this to someoneTweet about this on TwitterShare on FacebookShare on Google+Print this page

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.