Fail2ban的安装和使用

Fail2ban的安装和使用

1. 简介
CentOS 中使用fail2ban和firewalld限制IP拦截cc攻击

2. 安装和启动
• 安装

$ yum -y install fail2ban

安装后可以使用以下命令查看版本

$ fail2ban-client -V
$ fail2ban-server -V

显示如下

Fail2Ban v0.9.7
Copyright © 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
Copyright of modifications held by their respective authors.
Licensed under the GNU General Public License v2 (GPL).

Written by Cyril Jaquier [email protected].
Many contributions by Yaroslav O. Halchenko [email protected].

• 停止

$ systemctl stop fail2ban

• 启动

$ systemctl start fail2ban

• 重启

$ systemctl restart fail2ban

• 开机启动

$ systemctl enable fail

你可能感兴趣的:(Fail2ban的安装和使用)