Jan Walraven
DevOps



Categories:
  • Arduino (2)
  • CSS (3)
  • Docker (10)
  • Git (3)
  • Javascript (6)
  • Linux (31)
  • Mac (6)
  • Magento (4)
  • Mysql (13)
  • PHP (9)
  • Zend framework 2 (9)
  • Posted on March 6, 2017

    Installation

    $ sudo yum install -y epel-release
    $ sudo yum install -y fail2ban fail2ban-systemd
    $ sudo yum update -y selinux-policy*

    Configure Fail2Ban

    Edit the file /etc/fail2ban/jail.d/sshd.local

    [sshd]
    enabled = true
    port = ssh
    #Disable this line
    #action = firewallcmd-ipset
    logpath = %(sshd_log)s
    maxretry = 5
    bantime = 86400
    

    Edit /etc/fail2ban/jail.conf

    ignoreip = 127.0.0.1/8 YOURIP

    Enable and start Fail2Ban

    $ sudo systemctl enable fail2ban
    $ sudo systemctl start fail2ban