yum search oracle-epel-release
yum install oracle-epel-release-el7
search fail2ban
yum install fail2ban
nano /etc/fail2ban/jail.d/00-firewalld.conf?
# defalut這里是設定全局設置,如果下面的監控沒有設置就以全局設置的值設置。
[DEFAULT]
# 用于指定哪些地址ip可以忽略 fail2ban 防御,以空格間隔。
ignoreip = 127.0.0.1/8
# ssh客戶端主機被禁止的時長(默認單位為秒)
bantime ?= 3600
# 過濾的時長(秒)
findtime ?= 600
# 匹配到的閾值(允許失敗次數)
maxretry = 3
?
?
[ssh-iptables]
# 是否開啟
enabled ?= true
# 過濾規則
filter ? = sshd
# 動作
action ? = iptables[name=SSH, port=ssh, protocol=tcp]
# 日志文件的路徑
logpath ?= /var/log/secure
# 匹配到的閾值(次數)
maxretry = 3
fail2ban-client reload
systemctl start fail2ban
systemctl status fail2ban
fail2ban-client reload
systemctl enable fail2ban
fail2ban-client status ssh-iptables?
#取消ban某個ip
fail2ban-client set ssh-iptables unbanip 2.3.4.7
安裝neofetch
curl -o /etc/yum.repos.d/konimex-neofetch-epel-7.repo https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo
yum install neofetch