安装fail2ban服务,防止用户暴力破解root密码(最多让试着登录5次,5次密码输错就封杀ip)
[root@bogon ~]# ls
epel-release-6-8.noarch.rpm
[root@bogon ~]# rpm -ivh epel-release-6-8.noarch.rpm #或yum -y install epel-release
[root@bogon ~]# yum install fail2ban -y
复制jail.conf文件到jail.local:
[root@bogon ~]# cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
全局配置:
[root@bogon ~]# vim /etc/fail2ban/jail.local
[DEFAULT]
#ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 #根据需要添加,用于指定哪些地址可以忽略fail2ban防御
标签:epel,暴力破解,rpm,jail,fail2ban,bogon,root From: https://blog.csdn.net/qq_34953582/article/details/139337299