pimvh.fail2ban

分子测试

需求

  1. 安装 Ansible:
sudo apt install python3
python3 -m ensurepip --upgrade
pip3 install ansible

必需的变量

根据默认设置设置变量。

当前可用的 fail2ban 监狱有:

  • sshd
  • nginx
  • postfix

示例剧本

hosts:
  - foo
roles:
  - ansible-fail2ban

简而言之 - 如果我运行这个会发生什么

  • 安装 fail2ban
  • 将 fail2ban 配置模板移动到主机(根据监狱参数)
  • 重新加载 fail2ban 配置

注意:这将配置 fail2ban 以添加到 nftables(而不是 iptables)

未来改进

  • 允许非授权区域和关键指令
  • 改进变量的合理默认值(请参见 defaults/main.yaml 中定义的默认值)
  • 允许在记录中传递 TTL
  • 在 dnssecpls 脚本中添加自动 KSK 滚动
  • 允许使用来自 ZSK 滚动等不同变量的 dnssecpls 脚本的重复
  • 仅在需要时更新序列,而不是在运行角色时更新
关于项目

role to configure fail2ban using nftables, and optionally you can pass an abuseipdb API key.

安装
ansible-galaxy install pimvh.fail2ban
许可证
gpl-3.0
下载
95
拥有者