fail2ban简介与安装
-
fail2ban简介
fail2ban是一款实用软件,用于监视的系统日志,然后匹配日志的错误信息(正则式匹配)执行相应的屏蔽动作。
-
安装
- 上传包
- 进行解压
[[email protected] ~]# tar zxf fail2ban-0.9.0.tar.gz
[[email protected] ~]# cd fail2ban-0.9.0
[[email protected] fail2ban-0.9.0]# ./setup.py install - 安装结果
- 文件配置和参数
[[email protected] fail2ban-0.9.0]# ll /etc/fail2ban/ - 结果
- 查询状态
[[email protected] fail2ban-0.9.0]# grep chkconfig ./* -R –color - 查询结果
- 复制文件
cp files/redhat-initd /etc/init.d/fail2ban - 启动fail2ban
[[email protected] fail2ban-0.9.0]# service fail2ban restart - 编辑配置文件
[[email protected] fail2ban-0.9.0]#vi /etc/fail2ban/jail.conf - 上一级的启动
[[email protected] fail2ban-0.9.0]# !service
- 上传包