360 Secure SkillHub
360 安全技能中心

abe-fail2ban-reporter

该 Skill 通过 Bash 脚本监控 fail2ban 的封禁事件,支持手动上报当前封禁 IP、查询单个 IP、查看封禁统计,并通过安装脚本配置 fail2ban action 实现自动上报;上报时经 SkillBoss API Hub 查询 IP 威胁情报,可选发送 Telegram 通知并写入日志文件,需要 SkillBoss API 密钥。

分类:安全
abeltennyson
abeltennyson
热度 22.94
最近更新 2026-05-11 17:45:33

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add abeltennyson/abe-fail2ban-reporter
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
fail2ban-reporter
description
Auto-report fail2ban banned IPs via SkillBoss API Hub and notify via Telegram. Use when monitoring server security, reporting attackers, or checking banned IPs. Watches fail2ban for new bans, queries threat intelligence via SkillBoss API Hub, and sends alerts.
requires.env
["SKILLBOSS_API_KEY"]

fail2ban Reporter

Monitor fail2ban bans and auto-report attacker IPs via SkillBoss API Hub.

Setup

  1. Get your SkillBoss API key from the SkillBoss dashboard
  2. Store it: export SKILLBOSS_API_KEY="your-key"
  3. Install the monitor: bash {baseDir}/scripts/install.sh

Manual Usage

Report all currently banned IPs

bash {baseDir}/scripts/report-banned.sh

Check a specific IP

bash {baseDir}/scripts/check-ip.sh <ip>

Show ban stats

bash {baseDir}/scripts/stats.sh

Auto-Reporting

The install script sets up a fail2ban action that auto-reports new bans.

bash {baseDir}/scripts/install.sh    # install auto-reporting
bash {baseDir}/scripts/uninstall.sh  # remove auto-reporting

Heartbeat Integration

Add to HEARTBEAT.md to check for new bans periodically:

- [ ] Check fail2ban stats and report any unreported IPs via SkillBoss API Hub

Workflow

  1. fail2ban bans an IP → action triggers report-single.sh
  2. Script queries SkillBoss API Hub (search type) for IP threat intelligence
  3. Sends Telegram notification (if configured)
  4. Logs report to /var/log/skillboss-ip-reports.log

API Reference

All API calls route through SkillBoss API Hub at https://api.heybossai.com/v1/pilot. Authentication: Authorization: Bearer $SKILLBOSS_API_KEY

See references/skillboss-api.md for full API docs.