centos 7 安裝fail2ban

Fail2ban可以防止惡意的一些try attach,當try太多次時,會主動阻檔

記得要先yum upgrade , yum update

1.先增加EPLE (Extra Packages for Enterprise Linux)

sudo yum install epel-release

2.安裝fail2ban

sudo yum install fail2ban

3.設定啟動時開啟fail2ban (fail2ban start on boot)

sudo systemctl enable fail2ban

4.啟動fail2ban

sudo systemctl start fail2ban

就完成安裝了,再來需要做一些預設值的設定

sudo nano /etc/fail2ban/jail.local

Read More