show code js

2021年7月18日 星期日

fail2ban

可防範對某一服務的暴力破解或掃描的行為

  1. ready
    install and active firewalld
    install epel-release
  2. install
    yum install -y fail2ban
  3. add /etc/fail2ban/jail.local, can use nano
    [DEFAULT]
    # white list
    ignoreip = 127.0.0.1
    # ban time
    bantime  = 600
    # ho much time to try to maxretry
    findtime = 600
    # try time
    maxretry = 5

    [sshd]
    # [service name]
    enabled = true
  4. active
    systemctl enable fail2ban
    systemctl start fail2ban

沒有留言:

張貼留言