fix(egress): container map refreshed on start; no new_geo for anycast CDNs (2.2.2)
A LambdaMail redeploy swapped rspamd and clamav addresses and the hub judged the next minute with the stale containers.map, filing SURBL/DNS traffic under clamav and freshclam under dns. The host kit now runs urutau-containers-watch (docker events -> map rewrite) and the probe polls the file every 2 s. new_geo is skipped for large CDNs/clouds: anycast addresses carry a meaningless database country (1.1.1.1 in AU, Cloudflare edges in CA). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87178dbc94
commit
65015158dc
17 files changed
+81
-14
No files matched your search
@@ -752,7 +752,9 @@ func (e *Engine) checks(ws *wstate, ev Event, dport uint16, t int64, ds *dstStat
|
||||
if ws.role != RoleScanner && !fan && ds.cc != "" && isGlobal(ev.Dst) {
|
||||
if _, seen := ws.geo[ds.cc]; !seen {
|
||||
ws.geo[ds.cc] = struct{}{}
|
||||
if t-ws.first >= int64(e.cfg.Learn/time.Second) {
|
||||
// Anycast CDNs and big clouds: the database country of 1.1.1.1 or a
|
||||
// Cloudflare edge says nothing about where the traffic goes.
|
||||
if t-ws.first >= int64(e.cfg.Learn/time.Second) && !commonCloudASNs[ds.asn] && !inCommonCDN(ev.Dst) {
|
||||
e.addFinding("new_geo", "low", ws.name, dst, dport, ev.Proto, t, 0, 0, "first contact with country "+ds.cc+" "+ds.asn, 1)
|
||||
}
|
||||
} else if len(ws.geo) > 300 {
|
||||
|
||||
Reference in new issue
Block a user