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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值