Oracle Linux Server 7.9安装fail2ban
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
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.kler.cn/a/588638.html 如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!