feat(ingress): firewall telemetry of inbound attempts (host kit --ingress)
Observation-only nftables table (prerouting -150, counters and a rate-limited log, never drops or modifies), a per-minute counters file, probe sources ingress and ingresscnt, a per-host hourly aggregate in the hub (exact totals, sampled ports/ASNs/countries, banned share by the hub's own ban state, no ban feedback loop), GET /api/v1/ingress, a Defense section, doctor check, docs EN/pt-BR and tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4143bf599e
commit
aefdcea8d2
40 files changed
+1684
-11
No files matched your search
+2
-1
@@ -127,7 +127,7 @@ A side rail (a tab bar on phones, with a "More" menu that scrolls when it is tal
|
||||
|
||||
### Operate
|
||||
|
||||
**Defense** (`#/defense`): coverage and leaks of bans and of the blocklist. An attacker counts as protected when it is listed or banned by any jail; the API also splits one-shot from repeat attackers (`one_shot`, `repeat_ips`). It also holds the **second firewall** section (`URUTAU_ENFORCE=off|observe|on`): the mode, recent decisions with their reason (for example `known-attacker`, `port-scan`, `neighbor-campaign`), coverage, and the operator releases. Urutau only decides and writes the decisions to a file; the host fail2ban (jail `urutau`) applies them, and in `observe` mode it shows what would be blocked. It never blocks trusted addresses, private ranges, CDN and public resolver ranges, probes, the server itself or crawlers verified by forward-confirmed reverse DNS (Googlebot, Bingbot, Applebot). An **Unban** button on recent decisions and on the address page asks the host to lift the block (through `unban.log` next to `--enforce-log`) and can keep the second firewall from banning the address again for 1 h, 24 h or 7 days. With `URUTAU_ENFORCE_SHARE` the nodes of the probes exchange decisions, each node applying its own exclusions.
|
||||
**Defense** (`#/defense`): coverage and leaks of bans and of the blocklist. An attacker counts as protected when it is listed or banned by any jail; the API also splits one-shot from repeat attackers (`one_shot`, `repeat_ips`). It also holds the **second firewall** section (`URUTAU_ENFORCE=off|observe|on`): the mode, recent decisions with their reason (for example `known-attacker`, `port-scan`, `neighbor-campaign`), coverage, and the operator releases. Below it, **Firewall: inbound attempts** shows what reaches the host before any ban drops it (host kit `--ingress`): exact totals and an hourly chart from the kit counters, the share that went to closed ports, the share from sources banned at that moment (estimated from the sample), and the top destination ports, origin networks and countries, all labelled as sampled. A cloud provider firewall blocks some ports before the host, so it is what reaches the host. Urutau only decides and writes the decisions to a file; the host fail2ban (jail `urutau`) applies them, and in `observe` mode it shows what would be blocked. It never blocks trusted addresses, private ranges, CDN and public resolver ranges, probes, the server itself or crawlers verified by forward-confirmed reverse DNS (Googlebot, Bingbot, Applebot). An **Unban** button on recent decisions and on the address page asks the host to lift the block (through `unban.log` next to `--enforce-log`) and can keep the second firewall from banning the address again for 1 h, 24 h or 7 days. With `URUTAU_ENFORCE_SHARE` the nodes of the probes exchange decisions, each node applying its own exclusions.
|
||||
|
||||
<p align="center"><img src="img/defense-dark.png" width="900" alt="Page: Defense, with the second firewall"><br><sub>Defense: coverage of the host fail2ban and the second firewall (observe mode).</sub></p>
|
||||
|
||||
@@ -185,6 +185,7 @@ State and city boundaries on the Geography page are from [Natural Earth](https:/
|
||||
| `GET /api/v1/sessions/funnel` | session or bearer | sessions by stage (recon, probe, exploit, access, banned) |
|
||||
| `GET /api/v1/campaigns`, `/api/v1/campaigns/{id}` | session or bearer | campaigns of the period, and one campaign with its IPs |
|
||||
| `GET /api/v1/defense` | session or bearer | ban and blocklist coverage and leaks |
|
||||
| `GET /api/v1/ingress` | session or bearer | firewall telemetry: inbound attempts (`totals` exact, `sample`, `ports`, `asns`, `countries` sampled, `hourly`). Query: `range`, `host` |
|
||||
| `GET /api/v1/errors` | session or bearer | errors by class (`app`, `proxy`, `blocked`, `attack`, `bot`, `client`, `unknown`) |
|
||||
| `GET /api/v1/integrity` | session or bearer | health of the data: sources, registry, snapshot |
|
||||
| `GET /api/v1/report` | session or bearer | summary of a period (`format=html` returns the printable A4 report, with `lang`) (requests, attacks, hostile IPs, bans, visitors, non-human clients, page views, top IPs) |
|
||||
|
||||
Reference in new issue
Block a user