Shieldlist

Configuration file reference

YAML, one format only (SPEC §5.9). Hand-written config is the primary interface: flat keys, a default for everything that has a sensible one, compact scalar forms. The dry-run validator is the ground truth for this document: shieldlist-agent -t -config <dir> reports every problem at once, each with its file and line.

Layout

/usr/share/shieldlist-agent/    # the rules the package provides — replaced by an upgrade, never edited
  parsers/ rules/ policies/ reports/
/etc/shieldlist/                # yours — a file under the same name replaces the package's
  agent.yaml            # this machine (optional; absent = standalone defaults)
  parsers/**.yaml       # one parser per file — sub-directories by source (nginx/, sshd/…) for people
  rules/**.yaml         # one rule per file
  policies/**.yaml      # one ban policy per file
  reports/**.yaml       # one report preset per file (abuse reporting)
  packs/*.yaml          # optional: a pack = a named list of rules (what a controller gives a machine)
  trust.yaml            # optional list
  relaxed.yaml          # optional: the origins rules may judge more gently
  exemptions.yaml       # optional list, yours
  exemptions.d/*.yaml   # optional lists, one file per source
  exemptions-cli.yaml   # optional list, written by `shield exempt`
  secrets.yaml          # credentials — 0600, never deployed with the rest
/var/lib/shieldlist/            # the agent's state, never yours to edit
  agent.db              # the store
  received/             # enrolled: the tree the controller assembled for this machine
  machine.yaml          # enrolled: the controller's word on this machine (state, level, switches)

The four language directories are read flat and one level deep: a sub-directory is an ordering for people (a parser's source, a rule's category) and means nothing to the loader — one namespace, a name is defined once wherever its file sits. On a machine of its own every rule in the tree runs; packs/ is documentation there and the unit of assignment on a controller.

The package's rules are read first and /etc last, so a copy of one of ours under the same name in /etc replaces it; two files of the same name inside one directory are refused as everywhere. shield init writes the package's tree from the binary where no package put it (an install by hand), and an agent.yaml naming the logs this machine keeps, in detect-only; it never overwrites, and the Debian package runs it on a first install only.

A file in the format of the 0.0.x releases (match:, pattern:, category:, thresholds: per level, decay:, log_inputs:) is named by the loader and refused with one sentence: run shieldlist-agent -config DIR -convert NEWDIR (or the controller's -convert) — it rewrites the tree, comments kept, says what it changed, and the new tree is moved into place when it loads.

exemptions-cli.yaml is shieldlist's own file, beside yours so that neither rewrites the other's. It is ordinary YAML in the same format: read it, edit it, delete entries from it with whatever you normally use.

Canonical style

The remote control (SPEC §5.9) writes files in one style, and hand-written files are expected to follow it: two-space indentation, list entries as - blocks separated by one blank line so each entry reads as a unit, comments attached to the key they describe. Names are lower-case letters, digits and dashes.

agent.yaml

mode: local             # local (default) | enrolled
controller: ""          # base URL, required when enrolled
state: on               # on (default) | test — on its own; enrolled, the controller's declaration decides (shield enrol comments the key out)
level: standard         # scales every rule's threshold here: instant | strict | standard | lenient (see Rule) — idem
log_file: /var/log/shieldlist/agent.log   # as well as standard error

logs:
  - path: /var/log/nginx/access.log   # a file…
    log: http                          # …of this kind of line
    ports: [80, 443]                   # the service's ports here — what `ports: service` in a policy bans
  - path: /var/www/vhosts/system/*/logs/proxy_access_ssl_log   # …or many
    log: http
  - unit: ssh.service                 # …or a journald unit — exactly one
    log: ssh
    ports: [22]

limits:
  memory: 50%           # the ceiling the agent holds itself to: a share of
                        # the machine (the default is 50%) or a size
                        # ("512MB", "2GB"); see the agent's docs/RESOURCES.md

log_file is where the agent writes its own log, as well as to standard error — which under systemd is the journal, and has the same lines. Unset means the journal alone.

It exists because /var/log is the first place anyone looks after starting a security daemon, and finding nothing there reads as "it did not start". The agent reopens the file by itself when logrotate takes it away — it identifies it by (device, inode), like every other file it follows — so no logrotate configuration ships with it. The shipped systemd unit uses LogsDirectory=shieldlist-controller, which is what makes /var/log/shieldlist-controller writable under ProtectSystem=strict (its own directory, not the agent's /var/log/shieldlist: two units with two users cannot share one — the agent's unit took it back at every start).

log is what ties an input to its parsers: every parser reading that kind of line (log: http in the parser) runs over the input's lines. One source per kind per machine — reading the same lines from a file and a journald unit would count everything twice, and declaring the same input twice is refused for the same reason. Two patterns matching the same file is not: it is read once. ports are the service's ports on this machine — an sshd on 2222, a site on 8443 — the one place they are true; a policy with ports: service bans exactly those, and bans every port when none are declared (said once at start).

A path may be a pattern (*, ?, […]), which is how a machine hosting sites is watched at all — a panel gives every site its own log directory, and sites are added by people who are not thinking about this agent. The pattern is re-read every fifteen seconds: a site created this afternoon is watched this afternoon, and its log is read whole, as any file appearing after the agent started is. A pattern matching nothing is said at startup rather than left to look like silence.

Enrolled: taking configuration from a controller

mode: enrolled
controller: https://shield.example.net:17453

Then, once, on the machine — with a join token minted on the controller (shieldlist-controller token):

shield enrol <join-token>

The agent keeps the credential it receives in its state store, pinned to the controller's certificate when the token carried its fingerprint, and from then on holds a connection to the controller: it presents the configuration revision it holds and receives a new one the moment the controller loads it, reports every sanction it decides, applies the fleet's sanctions and the lifts decided centrally, and sends its enforcement summary. It dials out only; nothing listens on the machine. Where a long-lived connection cannot be held, it asks every thirty seconds instead — same messages.

What comes from the controller: parsers, rules, policies, report presets, trust and the fleet's exemptions — the tree the controller assembled for this machine (its level and overrides applied), written under /var/lib/shieldlist/received/ so that shieldlist-agent -t and a person read the same files the agent runs. What stays local: agent.yaml, secrets.yaml, hooks, and your own exemptions*.yaml, which add to the fleet's. A new revision is applied in place — no restart; the rules' windows start over, sanctions and the kernel's sets are untouched. Until the first revision arrives, an enrolled agent runs on its local files. When the controller is away, it keeps enforcing on the last configuration received and says so once.

shield status shows both versions and where the conversation stands (controller_version, controller_revision, controller_sync, and controller_error when there is one); the controller's agent list shows the same from its side.

Running it beside what you already have

state: test puts every rule in test and keeps the agent off the data plane entirely: no nftables table, no restore, nothing added or removed. It decides, records and reports exactly as it would otherwise — shield status, shield why, the ban log — with every sanction marked unenforced.

That is how this is meant to be adopted: run it for a day next to fail2ban, CrowdSec or whatever guards the machine, read what it would have done, then set state: on. Doing the same thing by editing every rule is how one gets missed.

shield status and shield stats answer enforcement DETECT-ONLY first, before any count, because the one dangerous misreading is a screen full of bans on a machine that is not defending itself. While the agent is in that mode the CLI counts the records it made rather than the bans it holds — otherwise every figure would read zero next to a log full of decisions — and shield bans says so above its table.

The agent still checks that this machine could enforce: run shieldlist-agent -t and it builds the table it would use under a throwaway name, with no hook, and removes it. That is where a kernel that will not take some part of it says so, since an agent in test never finds out on its own.

Reading a log's past is off unless asked for:

replay_on_start: 6h             # read this much of the past at startup,
                                # enforce what would still be in force

A live agent joins the present. An operator who turns up after an attack began wants it to catch up, and restarting it is the tidiest way to ask. Only crossings whose sanction would still be running are acted on — window and ban duration. Files need their parser to declare a time_field; journald records its own time.

Parser

parser: ssh-auth-fail
log: ssh                        # the kind of line it reads — the word the machine's logs declare
prefilter: "Failed password"    # mandatory literal gate before the regex
regex: 'Failed password for (?:invalid user )?(?P<user>\S+) from (?P<ip>\S+)'

Named groups in regex become the parsed fields; (?P<ip>…) is what a rule bans. RE2 only. Ports are not a parser's business (see logs: in agent.yaml).

A parser may also say where the line carries its own timestamp:

time_field: time                # a capture group of the regex
time_format: nginx              # nginx, apache, syslog, rfc3339, unix,
                                # or a Go layout for anything else

Both halves or neither. A live agent never uses them — it stamps a line with the moment it read it, which is the same instant and costs nothing. They are what makes reading a log's past possible: replaying a week-old file where every line claimed to have happened now would have a windowed rule ban whoever appears in it.

syslog prints no year. The reader supplies its own, and a line dated ahead of the reader is taken as last year's — so a December log is still read correctly in January.

Point time_field at a timestamp the server writes, never at anything the client controls: a replay trusts the line's own clock, and an attacker who can write the timestamp can date their attack out of the window.

A parser needs exactly one gate: prefilter (a single literal) or prefilter_any (a list of tokens — the line must contain at least one, case-insensitively, before the regex runs). prefilter_any is what makes a list parser affordable: a 683-entry User-Agent list has no literal common to all entries, and ungated it cost ~920µs per line; the multi-literal gate answers in under a microsecond. The gate is a superset of the regex — it can only admit lines the regex then judges, never hide one from it.

The machine itself is never an offender — built in, not configured. Loopback and the machine's own interface addresses cannot be sanctioned by any rule, and addresses that are not publicly routable are never submitted to an abuse provider. No configuration of this program can firewall the machine it runs on.

Rule

One rule, one file, five blocks in the order things happen — what it reads, what it recognises, from how much, what it does, what it says:

rule: wp-login
description: Brute force on WordPress logins
category: web                    # where it is filed — web, mail, ssh, database, panel… (for people)
parsers: [wp-login-fail, wp-login-fail-apache]   # what it recognises (their `log:` says what it reads)
threshold: 5/10m                 # from how much: five hits in ten minutes
ban: human-ladder                # what it does: a ban policy (see Policy)
report: wp-bruteforce            # what it says: a report preset (default when absent)

Parsers. A bare name, a list of names, or entries with a weight — every hit adds its parser's weight (1 unless said otherwise; negative for traffic that argues against a ban), so one rule can add up varied behaviour:

parsers:
  - parser: wp-login-fail
    weight: 10                   # three of these alone would fire
  - parser: http-404
    weight: 3                    # or ten of these — or any mix
threshold: 30/10m

A regex may be written in the rule instead of naming a parser file — a rule with no reason to share its regex keeps regex and rule together:

rule: wp-xmlrpc-flood
log: http                        # the kind of line those regexes read
parsers:
  - regex: '^(?P<ip>\S+) .* "POST /xmlrpc\.php'
    prefilter: xmlrpc            # the literal that gates the regex, as in a parser
    weight: 2
  - http-404                     # shared parsers mix in freely
threshold: 10/1m
ban: web

The loader makes a parser of each such entry, named <rule>#<n> (wp-xmlrpc-flood#1) — the name the evidence, shield why and the Web UI show. log, and time_field/time_format when the lines carry their own time, sit on the rule and apply to every regex written in it; an entry names a parser or writes a regex, never both.

Threshold. One crossing — 5/10m, five points in ten minutes — is the rule; several, [5/1m, 20/1h], make it adaptive: the first crossed fires, one sanction either way (a second crossing while the ban runs is absorbed into it). The ban log line names the threshold that fired. threshold: 1/10m bans on the first hit.

Levels. A rule writes its numbers once; the machine's level scales them, the same way for every rule, and a person can predict it: instant — the first hit convicts (one point, the shortest window); strict — half the hits (rounded up, never below one); standard — as written (the default); lenient — twice the hits. level: in agent.yaml, or the machine's declaration on the controller (there, per pack and per rule too). Enrolled, the controller's level is the one that counts: the numbers arrive already scaled.

Ban, notify, report. ban names a policy — how long, on which ports, how the machine remembers (see Policy). notify: info | warning | critical raises a notification besides the ban, or instead of it (a rule with neither only records — a rule with notify and no ban is how "someone logged in as root" reaches you without banning anyone). report names a report preset (see Abuse reporting); every rule reports as one — default, built in, when the key is absent: the rule's name and a generic sentence, no field, one generic category. Whether reports leave at all is the machine's reporting:.

Everything else is optional, flat, and defaulted:

Key Default Values
count address what hits are counted per: address, network (a /24). asn, country — accepted, not evaluated yet: the rule loads and is reported inactive
state on on, test (detect-only in older files — read as the same, never written back), off
share yes no: the rule's bans stay on the machine, never offered to the fleet
distinct — count distinct values of this field instead of hits (never combined with a negative weight)
countries / except_countries — count only hits from these countries (ISO codes, FR, MA or a list) — or from all but these; needs the geo databases on the machine (below), else the rule waits and says so
asns / except_asns — the same by AS number (12322 or AS12322): an operator's whole network
targets / except_targets — count only hits aimed at these targets — or at all but these: the site or domain the hit was about (a {target} segment in the machine's logs: path names it from the file; a user=jo@example.org names its domain), as a name or a pattern with * (cloud.*, *.example.org); a hit with no target counts for except_targets, not for targets — the whitelist by site
except_paths — RE2 patterns; a hit whose path matches one is not the rule's business at all — not scored, not counted, not shown as a hit (a site's own software asking for a path that is not there). On the rule, never global
when — accepted, not evaluated yet: the rule loads and is reported inactive
relaxed — how the rule judges an offender in the relaxed list (relaxed.yaml): {threshold: 20/10m, ban: relaxed}, each key optional — what is left out is the rule's own. A threshold here counts the list apart (everyone else on the rule's); a ban names the policy the list gets. Absent: the list is judged like everyone else
description — what the requests were and why they are an attack, for the operator (console, rule pages) — never a threshold, a count or a window. The people it blocks never read it: the unblock page says what the rule's abuse report says (its preset's brief)

In test a rule records what it would have done — a sanction row marked unenforced, evidence included, shown by shield why — and never touches the data plane.

Policy

What a ban IS, named once, used by any rule:

policy: human-ladder
durations: [10m, 1h, 4h, 24h]   # first offence, second, third, fourth — the last repeats; or one: 24h
ports: all                      # all (default) | service (the machine's ports for the rule's log) | [80, 443]
memory: 30d                     # how long the machine remembers an address after its ban ENDED
tighten: 2x                     # optional: each return within memory divides the hits needed by this
reputation: {above: 90, duration: 30d}   # optional: the controller lengthens the ban when AbuseIPDB agrees

Repeat. An address banned here (by any rule) less than memory after its previous ban ended is a repeat: the next rung of the ladder, and with tighten fewer hits to convict. Measured from the ban's END, never its start — a long ban must not consume its own memory. No memory: the machine never forgets.

Reputation. The controller, not the agent: after a ban lands, it asks the provider (a day's cache, the account's budget) and, when the address's confidence score is at or above above, orders the machine the longer ban — after the fact, never between a hit and a sanction (SPEC principle 5). Needs an AbuseIPDB key in the controller's secrets.yaml.

duration_start is application by default; evidence starts the clock at the attack time instead (late evidence can then arrive already expired).

trust.yaml

A list of graduated weights on origins — where traffic comes from, never what it targets. An origin is auto-detected: a country code (FR), an ASN (AS3215), or a range (198.51.100.0/24).

- origin: FR
  require: 3x           # 3× the evidence before any rule fires
  range_ban: never      # never ban a whole range inside this origin

- origin: AS64500
  require: 0.5x         # below 1x demands less: distrust

relaxed.yaml

One list of origins the rules may judge more gently — consumer networks, where one address is a household today and another tomorrow. An entry is a country (FR), an ASN (AS64496), a range (192.0.2.0/24) or an address. Its offenders are still detected, judged, banned and reported: what changes is what each rule's relaxed: block says (its own thresholds, its own policy), and the list's optional ceiling.

max_ban: 30d          # optional: no ban of an entry lasts longer, whatever the rule
entries:
  - origin: AS64496
    note: a consumer network      # note, by, added: for people, carried as is
    by: alice
    added: 2026-11-29
  - origin: 192.0.2.0/24
    max_ban: 7d                   # optional: this entry's own longest ban, shorter or longer than the list's
# rules/mail-auth.yaml
threshold: 5/10m
ban: auth
relaxed:
  threshold: 20/10m   # the list needs twenty failures, everyone else five
  ban: relaxed        # and gets the relaxed ladder

The block can also be given from the list itself, by rule name — one place to set it on many rules, those a package ships included, and to take it back. A block here wins over the one in the rule's file; a name no rule carries is noted, never refused:

rules:
  mail-auth: {threshold: 20/10m, ban: relaxed}
  wp-login: {ban: relaxed}

On a controller, each machine is given the list with the blocks of its own rules, their thresholds scaled by the level that applies there.

max_ban caps every ban of an entry, a rule without a relaxed: block included; it never lengthens a shorter one. Countries and AS numbers need the geo databases on the machine; until they are there only the ranges and addresses count, and the machine says so. A sanction decided for an entry is marked relaxed. The shipped policy relaxed climbs 5m, 15m, 30m, 1h, 2h, 4h, 24h, 7d, 30d.

exemptions.yaml

The scope is the key itself; exactly one per entry. The traffic is still logged — an exemption removes the sanction, never the observation.

- ip: 203.0.113.7
  note: office

- range: 198.51.100.0/24
  only_paths: ["/api/*"]    # conditional: exempt only on these paths

- ip: 198.51.100.9
  until: 2026-09-01T00:00:00Z   # ends on its own — "let me back in while
  note: fixing the backup job   # I fix this", without a hole left open

until is an RFC3339 instant; without it the exemption is permanent. shield exempt -for 2h writes exactly this form into exemptions-cli.yaml.

Abuse reporting

The agent can submit the offenders it bans to an abuse database (AbuseIPDB today; SPEC §5.5). Three pieces, three files, and it takes all three before a single report leaves:

# agent.yaml — the switch. provider is the ONLY thing that arms it.
reporting:
  provider: abuseipdb
  # endpoint: https://…     # test/proxy override; unset = the real one
  # interval: 30s           # how often the sender looks for new bans

# secrets.yaml — the credential, 0600, never in version control.
abuseipdb:
  key: your-api-key
  daily_limit: 1000         # your plan — or deliberately less, to share
                            # one account between machines; "auto" learns
                            # the plan from the provider's first answer
  # enabled: false          # keep the key, send nothing — the Web UI's
                            # Settings → Reporting → AbuseIPDB writes this;
                            # absent means on (the key is the decision)

# reports/ssh-intrusion.yaml — what a report SAYS. Data you own.
report: ssh-intrusion
to: abuseipdb                       # the destination (the only one today; default)
when: always                        # always (default) | repeat-only: returning offenders only
categories: [brute-force, ssh]      # the provider's vocabulary, by name
says: "This address is trying SSH passwords for accounts it does not hold — a brute-force attack; blocked."
brief: 'SSH brute force'            # the few words the provider's comment opens with (one line, ≤ 100 characters);
                                    # absent: the comment opens with says. says is the explanation — the abuse
                                    # desk's mail, the console
include: []                         # parsed fields allowed to appear

A rule names its preset — report: ssh-intrusion — or reports as default, built in: the rule's name and a generic sentence, one generic category, no field (write reports/default.yaml to change it). report: none says its bans are never reported (no preset may take that name). On a controller, abuseipdb: {rules: {except: [waf-*]}} in controller.yaml (Settings → Reporting → Rules reported) keeps rules from AbuseIPDB fleet-wide: the controller never reports them, and a machine reporting with its own key receives them as report: none (agents from 0.1.0 build 335; an older one keeps reporting them, and the assembly says so). abuseipdb: {mode: bulk, bulk_every: 1h} (Settings → Reporting → AbuseIPDB → Reporting mode) makes the controller send its reports in files instead of one request each: the same text and categories, one line per address per file. A file leaves at once when 9 999 reports wait (the most one carries), else when bulk_every has passed since the last one (1 hour by default; from the plan's shortest, 15 minutes for 100 files a day, to 24 hours); nothing waiting, nothing is sent. bulk_max_per_day lowers the day's files below the plan's, never above: a hard ceiling. Once it is reached, or once AbuseIPDB says the day's files are spent, no request leaves before its reset; what cannot leave waits, across restarts, and a report older than AbuseIPDB's two months is abandoned (logged, counted, its ban marked expired). AbuseIPDB counts files apart (500 a day on Premium); a file's lines are not counted in the day's single reports. single (the default) sends them one by one.

Through a relay. AbuseIPDB shows each report with the country of the address that sent it. A controller hosted in one country that wants its reports to carry another sends them through a report relay — a small PHP page installed on any web host in that country (https://git.lrob.net/Shieldlist/shieldlist-report-relay):

# controller.yaml (Settings → Reporting → AbuseIPDB → Relay)
abuseipdb:
  mode: bulk
  relay: https://relay.example.com

# secrets.yaml
abuseipdb:
  relay_secret: a-long-random-string    # the relay's, 32 characters or more

The relay holds the AbuseIPDB key and accepts only the addresses and the secret it is configured with; the controller sends the secret and no key, to the provider's own paths under relay (/api/v2/report, /api/v2/bulk-report, /api/v2/clear-address), and reads the answer as if the provider had given it, quota headers included. While the relay does not answer, every page of the console shows it. In bulk mode the reports wait in the queue for it, like for a provider that is down; in single mode a report that could not leave has had its chance — use bulk with a relay.

A key placed before the switch is thrown is not a mistake: it is how a machine is prepared in test and armed later, each its own decision. Detect-only never reports: what was not enforced is not submitted.

include is a whitelist, and an empty one is normal. Only the fields it names can appear in the comment; everything else the parser captured — usernames, mailbox names, paths, the raw line — stays on the machine. Two names never appear whatever the list says: host and target, the site attacked. The comment is public and the site is a customer's; an address is reported for what it did, not for whom it did it to. The validator refuses a preset naming a field its rule never captures, because default-deny is only a property when the names are real. The comment is composed when the ban is decided, stored with it, and inspectable before it leaves (shield why).

A report gets one chance, at the moment of the detection. Whatever stops it — allowance spent, provider down, key refused — the outcome is logged on its own line and the sanction stays on record, still owed. Nothing is retried on a cadence and no backlog drains by itself: that would be the agent deciding to describe last week as if it were happening now. Sending the past is the operator's act:

shield report -last 6h        # counts, shows the estimate, asks
shield report -last 2d -n 500 -y
shield status reports         # owed / sent / duplicate, from the store

The allowance is watched from both ends: the agent stops at daily_limit on its own count, and reads the provider's rate-limit headers on every response — the same account may report from several machines, so only the provider knows the truth. When the provider says the day is spent, one probe every five minutes notices an upgraded plan or another machine freeing room; the daily reset is midnight UTC.

Category names, from the provider's list: dns-compromise, dns-poisoning, fraud-orders, ddos, ftp-brute-force, ping-of-death, phishing, fraud-voip, open-proxy, web-spam, email-spam, blog-spam, vpn-ip, port-scan, hacking, sql-injection, spoofing, brute-force, bad-web-bot, exploited-host, web-app-attack, ssh, iot-targeted. ssh and exploited-host are meant to be combined with a more specific one, which is why categories is a list.

Hooks

The operator's own endpoints, each POSTed one JSON document per enforced ban — a Discord relay, an inventory, a SIEM. Local configuration by invariant (SPEC §5.5): a controller can never push a hook, or whoever controlled the controller would choose where every machine's decisions are sent.

# agent.yaml
hooks:
  - url: https://ops.example.net/shieldlist?token=…
    # timeout: 5s        # per delivery; nothing waits on a hook
{"time":"2026-08-15T12:33:31Z","action":"ban","rule":"web01-mail",
 "address":"203.0.113.9/32","until":"2026-09-09T12:33:31Z",
 "duration":"25d0h","comment":"…","categories":"11,18"}

ports appears when the ban is service-scoped; comment is the composed default-deny report text (empty for a rule with no report) — a hook never receives a raw log line. Deliveries get one chance each, on the ban's heels, with the outcome logged; a hook that was down missed that ban and that is all. Detect-only produces no egress of any kind, hooks included. Credentials belong in the URL, which never leaves the machine and is logged as its host only.

The controller

The controller's tree is an agent tree — the library — plus what makes it a fleet's (SPEC §5.9):

/etc/shieldlist/controller/
  controller.yaml         the service itself
  parsers/<source>/ rules/ policies/ reports/   the LIBRARY: every parser, rule, policy, preset, once
  packs/<name>.yaml       a PACK: a named list of rules — what a machine is given
  agents/<hostname>.yaml  one machine: its packs, the rules it adds, what it changes, its logs
  trust.yaml exemptions.yaml exemptions.d/      the fleet's, to every machine
  secrets.yaml            the controller's own provider credentials

A machine runs the rules of its packs, plus the rules its declaration names — nothing else. A pack is a list (packs/plesk.yaml: pack: plesk, description, rules: [wp-login, wp-xmlrpc, …]); a rule is never copied, only listed, so a rule in two packs runs once on a machine given both. A machine's bundle carries its rules, the parsers they score, the policies and presets they name, the fleet's exemptions — what it needs and no more. A machine whose declaration leaves packs: out — or that has no declaration at all — runs the packs controller.yaml names (packs:, below — the shipped ones on a fresh install), in the state it names for undeclared machines (agent_state, test by default: arming is a person's act); packs: [] runs none, and a declaration's rules: adds to either. The Web UI (Rules → Packs, a grid of packs × servers; Servers → a server → Rules) and PATCH /v1/agents/{host}/declaration {packs: [...]} write the same key.

The package provides the free library — six packs and every parser, policy and preset they need — under /usr/share/shieldlist-controller, read with the tree and replaced by an upgrade, which is how a corrected rule reaches a controller at all; a file under the same name in the tree replaces the package's. shieldlist-controller init writes the library there from the binary where no package put it, and a starter controller.yaml when there is none; it never replaces a file.

shieldlist-controller -t -config /etc/shieldlist/controller validates all of it, every agent's assembly included, and prints what each machine gets. The defaults are read by the agent's own loader, so shieldlist-agent -t -config /etc/shieldlist/controller says the same thing about them.

# controller.yaml — everything optional
listen:
  agents: 0.0.0.0:17453     # the agent transport
  api: 127.0.0.1:17454      # the operator API and interface
state: /var/lib/shieldlist/controller
tls:                        # absent: a self-signed certificate under state/tls,
  cert: /path/fullchain.pem #   pinned by agents through the join token
  key: /path/privkey.pem    # both: the operator's own certificate
  off: false                # true: plain HTTP behind a proxy that terminates TLS
level: standard             # the fleet's default level
packs: [openssh, bind, mariadb, postfix-dovecot, web-essentials]   # what a machine without a declaration runs
agent_state: test           # and what it does with them until told otherwise: test | on
reporting: agent            # who reports a machine's sanctions: agent | controller | off (see below)
lift: owners                # who may lift a machine's sanctions: owners | operator
sources: [googlebot, bingbot, cloudflare]   # published exemption lists to fetch (opt-in)
sources_refresh: 24h        # on this schedule; unset = on command only

Published exemption sources. Search engines, CDNs and the AI assistants' fetchers (anthropic, openai-chatgpt-user, perplexity-user, mistral-user, duckassistbot, google-user-triggered-fetchers; the catalogue is shield sources), PrestaShop its CloudSync (prestashop-cloudsync), Anthropic its outbound addresses — the calls Claude makes to a site's MCP server (anthropic-outbound, a fixed allocation) publish their address ranges; naming a source exempts them without pasting a range. The catalogue is compiled in — googlebot, google-special-crawlers, bingbot, applebot, cloudflare, jetpack (Automattic's Jetpack callers, for shared hosting), ahrefs (AhrefsBot, the SEO crawler), icloud-private-relay (Apple's Private Relay egress addresses: an iPhone with Private Relay on reaches a site from an address shared by many people of one area, so a ban on one is a ban on all of them; the published list of 285 000 slices is collapsed to about 14 000 prefixes) — and nothing is fetched unless sources: names it: a fetch is outbound traffic (SPEC principle 5). A refresh writes exemptions.d/source-<name>.yaml whole (generated, never hand-edited), reloads and pushes it to every agent; an empty list, a huge one, or a prefix wider than any crawler list ever is, is refused and the last good file stays. shield sources shows each source's state, shield refresh <name|all> fetches now.

The client view lets a hosting provider show each customer the bans their own sites drew, in their own portal — see CLIENT-VIEW.md for the integration. Off unless enabled: on; every figure below is the default.

# controller.yaml
client_view:
  enabled: on
  token_max: 90d          # the longest life an issuer may give a portal token
  token_default: 1h       # the life when it names none
  targets_max: 500        # sites one portal token may cover
  rate: 60                # reads a minute, per portal token
  days_max: 400           # the longest period one read may ask for
  keep: 400d              # how long the daily counts stay
  every: 10m              # how often today's counts are brought up to date
  forget: 30d             # how long an ended portal token is still listed
  origins: [https://portal.example.com]   # browsers allowed to call it (CORS); none: server-side only
  families:               # absent: the shipped ones (mail-password, scan, password, scraping, spam)
    - id: password
      labels: {en: Password guessing, fr: Essais de mots de passe}
      rules: ["*login*", "ssh*"]        # rule names or globs; the first family matching wins
  other: {en: Other attacks, fr: Autres attaques}   # the rules no family matched
  unblock: on             # portal tokens may be minted to unblock (each must still ask for it)
  unblock_rate: 30        # lifts an hour, per portal token
  unblock_max: 3          # lifts of one address by portal tokens within unblock_window; past that, the provider decides
  unblock_window: 24h

What a ban is said to be, to a blocked visitor (the unblock page, their mail) and to a customer (the client view), is its report preset's brief — the same words its abuse report gives. Other languages come from report_labels, by preset; the presets shipped with the product come in French already, and a line here wins over them:

# controller.yaml
report_labels:
  own-sweep: {fr: "Balayage de chemins"}   # preset name → language → text

GET /v1/report-labels lists every such text in each language and the languages each one lacks; PATCH /v1/report-labels {"labels": {preset: {lang: text}}} (administrators) sets some ("" removes one), the rest of the file kept. The fixed sentences are ~manual, ~recidivism and ~blocked.

One truth, two ways to change it. A declaration lives in the controller's tree, and the console edits that same file — a server's group, packs, firewall: what Servers → the server changes is written to agents/<host>.yaml and reloaded, with nothing kept elsewhere to drift from it. Who runs the fleet as code edits the same files instead — by hand, from a checkout of the tree, or with PUT /v1/files/agents/<host>.yaml — then reloads (shieldlist-controller -t checks first). Either way, the file is what holds; a copy kept outside the tree is a copy, to be read back from it before it is edited, never pushed over it.

# agents/web01.yaml — the file is named after the agent (its hostname, as
# the machine reports it: `hostname` there — web1.example.net or web1)
agent: web01
name: web01.example.net          # what the Web UI, the exports and the desks' mails call it (default: the hostname as the machine reports it — give a machine that reports a short one its full name)
description: the infrastructure host
group: clients/acme/web          # its category, a slash per sub-category: sorts the console and the rail, scopes exemptions (group:clients covers clients/acme/…), and is what a firewall template is given to
level: strict                    # scales every rule here: instant | strict | standard | lenient
packs: [openssh, plesk, custom]  # the packs it runs — or, per pack, how:
# packs:
#   plesk: {}
#   infra: {state: test, level: strict}   # this pack test here, at its own level
state: on                        # on | test — the agent's own may relax it, never arm it
fleet:                           # the pack is the unit of sharing: another machine's
                                 # ban applies here when its rule belongs to a pack
                                 # both machines run — a rule outside every pack
                                 # never travels, `share: no` on a rule is absolute
  offer: no                      # its sanctions are offered to the machines sharing its packs (default yes)
  enforce: no                    # it applies the sanctions of the machines sharing its packs (default yes)
lift: operator                   # only the operator may lift its bans
reporting: agent                 # agent | controller | off
rules:                           # what this machine changes about a rule — or adds
  ssh-bruteforce: {level: lenient}           # this rule alone at another level here
  http-bad-ua: {threshold: [3/1m, 10/1h]}    # its own numbers here
  wp-scan: {state: off}
  mail-auth: {ban: mail-hardcore}
  root-login:                                # a rule outside its packs, named: it runs here as written
logs:                            # where this machine's logs are (pushed; empty: its own agent.yaml says)
  - {path: /var/log/nginx/*.log, log: http, ports: [80, 443]}
  # An attribution log: a second access_log the server writes with the TCP source port, declared as its
  # log_format ($remote_addr, $remote_port and $time_iso8601 or $time_local needed; "$request" tells two
  # requests of one address in a second apart). Read by no parser: the port is attached to each line of
  # evidence (src_port) when a ban is decided, and travels into the X-ARF document, the desk's mail and
  # the console — what a network behind a carrier-grade NAT needs to find the subscriber (RFC 6302).
  # Agents from build 317 of 0.1.0; an older agent is given the declaration without it.
  - {path: "/var/www/vhosts/system/{target}/logs/attribution.log", attribution: '$time_iso8601 $remote_addr $remote_port $host "$request"'}

An entry under rules: changes what one machine runs of one rule — its level (instant, strict, standard, lenient: the rule's numbers scaled), its threshold outright, its state, its policy — and, for a rule outside the machine's packs, adds the rule to it. Parsers, policies and presets are shared, never overridden: a machine that needs a different regex needs a different rule. The controller assembles each machine's tree, rewrites only the rules that differ (comments kept), validates the result with the agent's loader before it leaves, and refuses an agent older than 0.1.0 by name — it keeps running what it last received, and the operator is told to upgrade it. shieldlist-controller -t prints every machine's assembly and what differs. A machine enrolled without a file under agents/ runs the packs controller.yaml names, in test.

The machine's firewall. firewall: in a declaration is the machine's service rules — what it serves, from where, and whether everything else is refused — kept in the agent's own nftables table beside its bans, in a chain of its own on the input hook. Nothing else on the machine is touched: another firewall may stay (both must accept, either may refuse).

firewall:
  state: test                 # off (nothing generated, the default) | test | on
  default: deny               # allow: only deny: refuses | deny: all but services:
  include: [ssh, web, {mysql: {from: [office]}}]   # presets, firewall/<name>.yaml
  services:                   # what the machine serves
    - {ports: [8443], from: [office, 198.51.100.9], note: "panel, office only", since: 2026-11-04}
    - {ports: ["53/both"], family: v4, note: "dns", since: 2026-11-04}
  deny:                       # refused whatever default says
    - {ports: [11211], note: "memcached, never exposed", since: 2026-11-04}

Every entry carries a note and a since (YYYY-MM-DD): the two things a rule typed into a panel never recorded. ports: a number, a range a-b, /tcp (the default), /udp or /both. from: addresses, prefixes, the name of a list of the tree written as prefixes, or machines of the fleet — fleet (every one), group:<path> (that group and the ones below it), host:<machine> — whose addresses, declared or reported (below), the controller writes in their place; an entry with from is allowed from those sources and refused from the others; without, open to all. all: yes (services only, with from, without ports) allows every port and protocol from its sources — a management host, an office. family: v4, v6 or both (the default). include folds presets in: ssh, web, mail, dns, plesk-server (a whole Plesk server: SSH, web, the panel and its updates, mail, FTP and DNS — Plesk is a master name server by default), mysql, netdata, shieldlist-controller, ftp, turn, dhcp-client, rndc (BIND's control channel, 953/tcp, for the hosts that manage the zones); a preset that needs sources (mysql, netdata, rndc) is included as {name: {from: [...]}} and refused without them. The shipped presets are read-only; an operator's own sit in the tree's firewall/<name>.yaml, in the same format, under names of their own (Firewall → Presets: Duplicate… a shipped one, New preset…; GET /v1/firewall-presets lists them with who uses each, PUT/DELETE /v1/firewall-presets/{name} write them — a preset something names is not deleted). In the console's Firewall window, + Preset adds a preset to include: it shows as a block under its name whose lines follow the library, removed whole with its bin. A line of it is left aside on that machine with drop: [preset:<preset>:<note>] (a template's lines are dropped by their note alone). A port the machine's other lines already declare is not given twice, nor a second SSH entry: the preset's line keeps the rest. Lines a preset once copied are plain lines. The window edits one list at a time, by mode: allow list (default: deny, the services shown) or refuse list (default: allow, the deny shown). A machine with no firewall block starts as an allow list holding the SSH entry; a block without default stays a refuse list. The other list's rules change nothing in that mode and are kept until removed — except an allowed entry with from, which still drops its ports for everyone else. A deny entry with from refuses those sources only (agents from build 366 of 0.1.0; the controller gives the firewall to no older one). A deny on a port a services entry names is refused by validation: the services come first in the chain, it would never apply.

Ports opened on demand. Some services open a port at the moment they need one, in a range: an FTP data connection in passive mode, a TURN relay. Nothing listens there before, so the listeners never show them. The agent reads the range where the common services keep it — proftpd PassivePorts (its includes, Debian's conf.d, Plesk's proftpd.d), vsftpd pasv_min_port/pasv_max_port, pure-ftpd PassivePortRange, coturn min-port/max-port — best effort, and reports it with the listeners (on_demand in GET /v1/firewall/{host}). A preset may ask for such a range (ranges: — ftp, turn): the console fills it in from what was read, or leaves it to the operator. In test, the ports traffic would have been dropped on are counted (would_refuse.by_port), which shows any range missed before the rules are switched on.

A group set directly. A group takes its own rules — presets and lines set on the group itself, no template to name: the console's Set up its own rules… on the group. They are kept as a template named own-<the group's path> with group: <path>, given to that group alone and not listed among the templates; Save as a named template… turns them into one other groups may follow. A server takes a setting of its own in its Firewall window (its group's, its own lines only, or a named template). Every change is shown resolved first — each server's ports and sources as its agent will take them, and what differs from what it runs (POST /v1/firewall/{host}/preview, /v1/firewall-assign/preview, /v1/firewall-templates/{name}/preview).

Template parameters. A template shared between clients cannot name each client's sources itself: it declares parameters and writes $name in a line's or an include's from; where it is given, the assignment fills them in — anything a from takes (addresses, a list, fleet, group:…, host:…):

# firewall-templates/dns.yaml
params:
  masters: {note: the zone masters}
  admin: {optional: true}        # left empty: its token leaves the lines
services:
  - {ports: [953], from: [$masters], note: rndc, since: 2026-11-07}
# firewall-assign.yaml
groups: {core/dns: dns, clients/acme/dns: dns}
params:
  group:core/dns: {masters: [group:core/plesk]}
  group:clients/acme/dns: {masters: [host:panel.example.net]}

A required parameter missing where the template is given refuses the assignment; a server's own template takes its values under server:<name>. The console asks for them when such a template is given, with the same Machines… picker.

Stock templates. The controller ships starting points, read-only, listed beside the operator's (shipped): dns-authoritative (SSH, DNS for everyone, DHCP client, and rndc on 953/tcp — open by default, BIND applying its own key and allow-list, or limited to the masters parameter) and dns-resolver (SSH, DHCP client, DNS and DNS over TLS for the required clients parameter only — an open resolver amplifies floods), plesk-server (the plesk-server preset: SSH, web, the panel, mail, FTP and DNS, Plesk being a master name server by default; MySQL is the operator's to add, with its sources), web (SSH and the web) and mail (SSH, SMTP and submission, POP3 and IMAP). A stock template is given as it ships and stays stock: it follows the package's updates (each revision given out is kept under firewall-templates/revisions/, so its servers keep resolving it until the group's next apply brings the new one). Edited, it is written into the tree under its name and wins — stock, modified — and POST /v1/firewall-templates/{name}/stock (Back to stock in the console) removes that copy, its revision kept for the servers pinned to it.

Templates. One rule set for many servers — the DNS servers', the Plesk servers' — composed in firewall-templates/<name>.yaml:

template: dns
description: the DNS servers
default: deny                      # the mode its servers follow
include: [ssh, dns]                # presets added together, as they are in the library
services:
  - {ports: [8053], note: "stats", since: 2026-11-07}

Which servers follow which template is said apart, in firewall-assign.yaml, from the console's server list: a group (the servers' group:, its sub-groups included unless one has its own) follows at most one template, a server at most one — its own when it differs from its group's, an exception (none for no template at all):

groups: {hosting/dns: dns, clients/acme/dns: dns, hosting/plesk: plesk}
servers: {ns3.example.net: none}

A server keeps its own lines beside the template; drop: [note, …] in its block (template lines it leaves out) or its own default put it out of step, which the console says — the template is where a change for all its servers belongs. The block records what the server runs: template and template_rev, written by the controller. Whatever changes what a server should follow — a template edited, a group or a server given another — reaches the servers one at a time, each confirming the rules (or applying them, in test) before the next; the first refusal, withdrawal or two minutes without an answer stop it there. A server without rules joins in test. The revisions servers still run are kept in firewall-templates/revisions/<name>@<rev>.yaml. Saving a template, or giving one, checks it on every server it would reach first, as its agent would. The agent never sees a template: it receives its server's rules resolved.

Traffic. Each allowed rule counts what it lets in (fwN_ok: new connections, established traffic being accepted before any rule), the refusing rules what they refuse; the agent reports the counters at each sync, the controller keeps the per-minute differences for eight days, and sums each hour and each day as it closes, kept a year (retention.firewall_traffic, at least 8d). A window reads the widest sums that cover it. GET /v1/firewall and /v1/firewall/{host} give traffic over ?period=1h|24h|7d (24h by default) or ?since=&until= (RFC 3339); GET /v1/firewall/{host}/traffic the same window by step (?step= seconds, or at most 240 round steps; an hour at least past the eight days), with total and oldest. In test, would. The console: a window for the whole page, a Traffic column on Servers (a group's header sums its servers, sub-groups included), the Traffic tab, and the lines in a server's window.

What no declaration can refuse: the machine's own traffic, established connections, the ICMP both families need, the controller's addresses, the machine's own, the lists marked trusted_everywhere — and SSH on the ports sshd listens on, read from its configuration, never assumed 22. An exemption is not among them: it keeps an address from being banned, it opens no port (agents before build 375 of 0.1.0 still accepted every exemption on every port, published egress lists included).

# lists/management.yaml — accepted on every port of every machine
list: management
description: the hosts that administer the fleet
prefixes: [192.0.2.10, 2001:db8:10::/64]
trusted_everywhere: yes     # no prefix wider than /16 (IPv4) or /48 (IPv6)
exempt: fleet               # and never banned — a separate choice

A list trusted everywhere writes its prefixes down (not a network, a country, an offenders or a published list); a wider prefix needs trusted_wide: yes.

A list of prefixes may also name machines — members: [fleet], [group:clients/acme/plesk] (that group and the ones below it), [host:panel.example.net] — and holds their addresses beside its prefixes: the ones a declaration writes down (addresses:, for a failover address or a virtual IP), and the ones the machine's agent reports — every global address, v4 and v6, the truth of the machine. When they change, the controller writes them into firewall-addresses.yaml (within the minute) and reloads: what names the machine is pushed again, like any list that changes. A machine that reports nothing keeps the last ones known. GET /v1/lists/addresses shows every machine with its addresses and what names it (Lists → Machine addresses). A machine moved into a named group follows at the next reload. A firewall source that resolves to no address — machines that report none yet, an empty list — is never a silent drop: a template's optional parameter then leaves its line open as without it, any other source allows no one, and either way the machine and its groups say so in the console and at load; a change that would bring such a source (an assignment, a rollout, a machine's own lines) is refused with that message, nothing written. A list naming machines blocks nothing; it exempts, it is trusted, or it is a firewall source:

# lists/masters.yaml — the servers allowed to push zones
list: masters
members: [group:clients/acme/plesk]
# agents/ns1.example.net.yaml
firewall:
  services:
    - {ports: [953], from: [masters], note: rndc from the masters, since: 2026-11-07}

The controller sends the prefixes in each machine's firewall block (trusted:); the machine's Firewall window names the lists. The SSH entry (ssh: yes, what the ssh preset is) may restrict SSH to sources, never refuse it; default: deny is refused by validation without it, as is a deny that allows nothing. An agent needs no inbound port of its own: it connects out to the controller.

An exemption always wins over a range: a range (an IPv6 /64 included) holding an exempted address is never banned, and one banned before the exemption is lifted by the agents when they take it (at the next configuration, or at their start) — never reported either. The fleet's own machines are exempt on every machine: each bundle carries their addresses (exemptions.d/fleet.yaml, declared and reported), so a range holding one of them is withheld as any other.

The state is never implied: a server given its first firewall starts on unless test is chosen in the preview; a group is switched on or put in test from its header (POST /v1/firewall-assign/state {group, state, wave?}), and a server in test is shown as test — not enforced wherever its state is.

Every rollout — a group's setting, its state, a template's change — goes in waves: the first server alone, then wave at a time (5 by default, set in the preview), each confirming its own rules. A failure (the loader, the kernel, a ruleset withdrawn, no answer) stops it before the next wave; the servers of the wave under way finish. Stopped, it is resumed after a fix (POST /v1/firewall-rollout {key, act: resume}), continued past the failure (continue), or reverted — every server it changed put back as it was (revert). It runs on the controller: the window may be closed, the group's header says where it stands.

state: test counts and logs what the rules would refuse without refusing anything: the kernel log lines (rate-limited, one prefix per entry) are read by a built-in parser and rule, firewall-would-refuse, always in test, so each would-be refusal shows in the console as a test rule's record with its source and the entry's name as target. Arm with state: on. The ruleset is proven with nft -c and applied in one transaction; one the kernel refuses changes nothing and is reported. A declaration that fails validation is refused with file, line and cause.

Port labels. The inventory names no process (the agent holds no privilege for it, by decision): a listener is a port and an address, and the console labels the standard ports from a table versioned with the controller (internal/api/ports.go, aligned on the presets): 21 FTP, 22 SSH, 25/465/587 SMTP, 53 DNS, 68/546 DHCP client, 80/443 web, 110/995 POP3, 143/993 IMAP, 123 NTP, 631 CUPS, 853 DNS over TLS, 3306 MySQL/MariaDB, 5432 PostgreSQL, 6379 Redis, 8080 secondary web server, 8443/8447/8880 Plesk, 9000 PHP-FPM, 11211 memcached, 17453/17454/17455 Shieldlist, 19999 Netdata, 27017 MongoDB, 3000, 5900 VNC, 3389 RDP, 2222, 10000 Webmin, 9090, 9100, 106 poppassd, 4190 ManageSieve, 5355 LLMNR. Any other port reads "not identified". A port a server rarely needs open carries a hint, marked "rarely needed": 8880 (the Plesk panel over plain HTTP, redundant with 8443: closed, and off in Plesk), 8447 (the Plesk Installer, for the panel's updates: the plesk-server preset allows it), 3306 and 5432 (databases: only for declared remote addresses), 106 (mail password changes, served to the webmail on the machine: not to be exposed), 4190 (users' mail filters: open only for desktop clients that manage them remotely), 5355 (local network name resolution: refuse it, or turn LLMNR off). Docker's published ports are marked from its nat rules.

A ruleset that refuses (state: on) is provisional when applied: the agent confirms it at its next successful sync and, without one within two cycles (30 s at most), puts the previous ruleset back and says so (rollback in the history) — so that a rule which cut the machine off its controller undoes itself. The console's Firewall page and POST /v1/firewall/{host}/off switch a machine's block off at once; on the machine, shield fw off empties the chain and holds it empty until shield fw resume, whatever the controller says. The agent reports what it listens on; a socket no entry covers is shown as undeclared, and one click writes the line (allow or deny) into the declaration.

Who reports. reporting: — the fleet's default in controller.yaml, each machine's own in its declaration — says who submits a machine's enforced sanctions to the abuse provider: agent (the machine itself, with the key in ITS secrets.yaml), controller (this program, on the machine's behalf, with the key and daily_limit in the tree's secrets.yaml — one account, one address, for the fleet), or off. A machine told controller pauses its own sender; the controller then reports each of its sanctions once, as it arrives, composed from the rule's report preset and the fields the convicting lines named — the same words the agent would have used — and records the outcome on the sanction (the Web UI says "reported by the controller"; /v1/config counts them). What was not enforced is not submitted; a report the provider refused or the allowance could not cover is not retried; a lift "with withdraw" withdraws the controller's own report where it was the controller that reported. Detect-only machines report nothing whoever would report.

Sources of your own — custom_sources: in controller.yaml, each {name, url|urls, format: lines|cidr-lines|json-prefixes, note}, named in sources: like the catalogue's; the Web UI adds and removes them. Enabled sources are fetched when older than sources_refresh (never at every start), and on command.

Retention — retention: {evidence: 90d, samples: 60d, sanctions: 0} in controller.yaml (the defaults: evidence and what its lines named kept 90 days, the agents' counters 60 days, the sanctions for good; firewall_traffic: the firewall's hourly and daily counts, a year). Swept daily; Settings → Maintenance shows what the store holds and flushes on demand (POST /v1/maintenance/prune, …/vacuum).

Statistics on what the lines named — every convicting line carries what its parser captured, by group name (user, path… — at most 8, values cut at 128 bytes; time and ip left out), one row per name in the store (evidence_fields). To count a new thing, name a group in a pattern — (?P<path>\S+) — nothing else; GET /v1/sanctions/facets?facet=user &facet=path counts the values under the filters, field=user:admin filters by one. They live and die with the evidence (retention), and Settings → Maintenance flushes them apart (fields_older_than).

Hits over time — on every sync the agent sends the positive hits its rules scored since the last one, by offender (a flow, bounded to the busiest 2000 offenders, the rest unnamed); the controller resolves the origins and keeps them per minute (hit_samples: country, network) — the pressure the chart draws beside the bans, summed per step, under the server, country and network filters; kept as long as the samples. When the controller holds none of a machine's flow yet (a first enrolment, a fresh store), the agent backfills, once, the hits still inside its rules' windows, minute by minute — as far back as its longest window, no further: hits that fell out of every window are gone. (Before this the table held a sampled level — the hits inside the windows — which read as a flat lie; it is cleared once on upgrade.)

Abuse reports — an address's page and a network's page offer Abuse report…: everything that network (or one address of it, address=) did to the fleet over a window, with the log lines that convicted each address — GET /v1/networks/{asn}/report?format=csv|txt|json|list|xarf. xarf is the X-ARF v4 format the big abuse desks' tooling parses (one JSON document per address, in a zip; with address=, that document alone, the file to attach to your mail): the core fields, the target sites (destination_hosts), the server hit and every address it carries (destination_servers, destination_ips), the category and type the rule's report preset implies (a login attack, a vulnerability scan, scraping, a port scan, an injection, a flood, spam), the log lines base64-encoded with their SHA-256. It is signed by reporter: {org, contact, domain} in controller.yaml (Settings → General → Mail); an empty part falls back on console_url's host and mail.from, and without all three the export is refused.

Mails to the networks' abuse desks — owner_reports: in controller.yaml (Settings → Reporting → Abuse reports): enabled: on|off (off by default: a mail in your name is a deliberate act), default: on|off (what a network without a setting of its own gets — a network's own setting, under Lists → Networks or on the network's page, wins), format: xarf|text (the words a person reads with an X-ARF document attached, or the words alone), daily_limit (200), per_network (20 a day to one network), lines (3 log lines per ban), grouping: ban|hour|day (one mail per banned address, the default, or one mail per network for the bans that started in that hour or day, sent once it is over, in UTC — a summary, then every ban in full as its own mail would give it, one X-ARF document per ban attached as xarf.json in the xarf format, the header X-Shieldlist: owner-report-grouped; a grouped mail counts as one against the limits), replayed_grouping: period|hour|day (the bans an agent's replay of its logs' past made are never mailed one by one: period, the default, one mail per network for what a replay brought in, sent once an hour has passed without more; or by hour or day of the attacks), digest_subject and digest_template (that mail's text; empty: as shipped; {addresses_n} and {requests_n} give the counts with their noun, {from_day} the first attack's date, {part} "part 2 of 3"), max_addresses (1000: a network with more banned addresses gets several mails, "part 1 of N" appended to the subject, each counted against the limits), hold_replayed: on (a replay's bans are made and enforced, their grouped mails wait until a person sends them — POST /v1/owner-reports/release, Send them in the console — and the next replay's wait again; what was released keeps being retried; POST /v1/owner-reports/grouped-preview {"asn": …} renders a network's waiting mails, every part, and sends nothing), grouped_rule_texts: {rule: text} (what a grouped mail says of a rule, once over its addresses — the plural of its report words; Settings → Rules reported, "In a grouped mail") — a network's own setting, on its page or PATCH /v1/networks/{asn}/owner {grouping: ban|hour|day} ("" back to the fleet's), wins: ban mails its bans one by one, a replay's too, for a desk whose tooling takes single reports only, include: {target: off} (what every report carries beyond the address, its network, the time and the rule — target, the sites hit, named in the report and masked as [site] in its log lines with every name of their registrable domain; server, our server's name and addresses; lines; history, the address's previous bans; abuseipdb, its score — each on, the default, or off; a network's own setting, on its page or PATCH /v1/networks/{asn}/owner {include: {target: off}} with "" back to the fleet's, overrides it part by part: the sites left out of the mails to a hosting company that takes every domain a report names for one of its customers'), copy_to (a blind copy of every mail to a mailbox of yours, each with an X-Shieldlist: owner-report header to sort by), bounces: on (the delivery failures, read every ten minutes from the mail account's IMAP mailbox — mail: {imap, imap_user, imap_password, imap_security} — from bounces_folder, INBOX by default: a failure marks the report bounced and the network's desk as bouncing, no mail to it for a month, until you set an address by hand; POST /v1/owner-reports/bounces/check reads it now), keep_sent: on (a copy of every report that leaves filed in sent_folder of that mailbox, Sent by default — an alternative to copy_to), account: {smtp, user, password, security, imap, imap_user, imap_password, imap_security} (the reports' own mail account when the mail: account is another mailbox's: it sends in its own name — its user, or from — so bounces and answers come back where it reads; without it the mail: account sends with the abuse contact as From, and reads). A sent copy goes to sent_folder as named, else under the INBOX. prefix Dovecot expects, the folder created if missing. The relay's delay notices count too (Postfix sends them after delay_warning_time, off by default — 1h is a good value): a desk whose server keeps desk_pause_after (3) of our mails waiting past the hour ("421 … blocked", "too many concurrent sessions", no answer) within desk_pause_for (7d) is paused — it gets no new report until that span passes without a new notice, or Try again. A desk is not receiving our mail when, over desk_window (30d), at least desk_dead_min (20) reports went to it and desk_dead_rate (80) percent of them bounced or failed: a dead mailbox, not a gateway's passing delay. Both show in one line over the Reports page; Details opens each desk's figures — sent, delivered, failed, bounced, answered, over the window and in all — its failure rate, its last refusal word for word, and the networks it answers for (a desk that cannot take the abuse its network sends out is a reason to look at the network itself). Stop writing takes it off the reports for a number of days (desk_resume_after, 30d, offered) or until resumed (GET /v1/owner-reports/failing, DELETE /v1/owner-reports/failing/{email} to try again, POST /v1/owner-reports/unsubscribes {"email", "for": "30d"} to stop — for empty: until resumed). Every report carries its way out when public.page_url is set (the link must be reachable without a session): List-Unsubscribe with RFC 8058's one-click POST, and the same signed link at the foot of the text. Used, it takes that mailbox off the reports for every network it answers for — only a person's send now still reaches it — until you take it back (Settings → Reporting → Abuse reports, GET /v1/owner-reports/unsubscribes, DELETE /v1/owner-reports/unsubscribes/{email}). Your blind copy carries the same link: following it unsubscribes the desk. Every subject ends in a tag, [SL- and the first eight characters of the report's id ], matched back when an answer or a failure kept nothing else.

What the desks answer is read from the same mailbox, on the same cadence, by uid from where the last pass stopped. Each mail is sorted by patterns — internal/replies/patterns.yaml, shipped; a reply-patterns.yaml beside controller.yaml adds yours, tried first, one of the same name replacing the shipped one (read at each pass) — into a kind: ack (acknowledged), ticket (with a reference, kept), resolved (the desk says it acted, or closed), refusal (the desk takes no report by mail: a form, a portal), info (the desk asks for something), human (a person wrote, no pattern), unknown (a machine wrote, nothing understood), bounce (the failure, as above). Whether a machine wrote comes from the headers (Auto-Submitted, Precedence, a no-reply sender, "this is an automatic reply") or from the pattern (auto: true); a pattern with person: true says a person wrote whatever the headers claim — a helpdesk relays its agent's answer as an automatic mail (Zendesk marks every notification Auto-Submitted). An acknowledgement or a "we acted" that asks nothing — no question mark in the desk's own words, links aside — waits for nobody, whoever wrote it; one that asks something is read. Absence notices are settled too. Form letters are read in their own language too — an automatic reply saying so (Czech, Portuguese, German, Spanish, Italian, French, Dutch, Russian), a case or reference number given, a closing form letter. A failure said in words — a relayed delivery notice, a filter's rejection — is a bounce (failed: true on its pattern): the address it names fails as a delivery report would, when it is the one the report went to (a helpdesk's own onward mail failing is not ours). When the patterns change, the answers kept as human or unknown are read again once, changed only where a pattern decides (never one sorted by hand). The same letter from the same desk (its domain; 90 % of the same words, numbers and addresses aside, a dozen words at least) is an acknowledgement from its second time on, the earlier ones with it (pattern same-letter): a form letter is never a mail to read. The desk's words are the first stretch of the mail with something in it before a quote begins — so an answer written under the quote's "On … wrote:" line is read too. An answer is tied to the report it quotes (the X-ARF id, the subject's tag, the Message-ID it replies to, the address the quoted subject names) else to the network whose desk wrote (the sender's domain against the desks mailed within two weeks). A spam filter's wrapper (***SPAM***, the original attached) is opened. What a machine settled is marked seen in the mailbox; what waits for a person — a person's mail, a request, the unreadable — stays unread, is counted (GET /v1/owner-reports → replies.to_read), shown red on the network's page and under Lists → Networks (column Response, filter An answer to read), and cleared by Mark handled (PATCH /v1/owner-reports/replies/{id} {handled: true}; {kind} re-sorts one by hand). GET /v1/owner-reports/replies?kind=toread|…&asn=&report=&q=&open=1&limit=&before=&after=&order= lists them — the ones to read oldest first, every other view newest first; order=oldest|newest says otherwise — (limit up to 500, 100 by default), with total (all pages) and next (the after= of the next page when the oldest come first, its before= otherwise; 0 on the last); GET …/replies/{id}/similar says how many mails wait from the same desk (its domain) with the same words — 90 %, numbers and addresses aside: one form letter many times — and POST acknowledges them (Same letter… in the console); each carries to, whom the mail was addressed to (To then Cc), so a desk that forwards our report to its customer with us in copy reads as such. The Reports page of the console is the whole exchange: GET /v1/owner-reports/list?outcome=&response=&kind=&asn=&q=&period=24h|7d|all&limit=&offset= (q looks in the address, the desk, the rule, the server and the network's name; q=AS16276 or q=16276 is that network) (every report with its latest answer, total for the pages; a live page asks after=<id>&changed_since=<unix> for the difference only — the reports newer than the top one and those answered since), GET /v1/owner-reports/{id} (the report's words rendered again from the sanction, the thread in order, the ban with its lines, every ban of the address on record, every other report about it), POST /v1/owner-reports/{id}/reply {to, html | text, files} (a person's answer into the thread: in reply to the desk's last mail, its ticket kept in the subject, recorded as an answer of ours, copy kept; files is what they attach, [{name, type, data}] with the bytes in base64, 10 MB a file and 15 MB in all, sent as attachments and kept with the record), POST /v1/owner-reports/{id}/forward {to, html | text, reply, files} (one mail of the thread — the desk's answer named by reply, the report itself when 0 — sent whole to another address under the person's words, as a new thread tagged with the report so an answer lands in it; recorded as a mail of ours), POST /v1/owner-reports/{id}/handled, POST /v1/owner-reports/replies/acknowledge {all: true} (every mail waiting for a person acknowledged at once), GET /v1/owner-reports/count (what the menu shows: to_read, and of those open_human and open_unknown), POST /v1/owner-reports/replies/{id}/reply and …/forward (the same for any mail of a desk — the one no report of ours claims included; through the report's thread when it has one), GET /v1/owner-reports/replies/{id}/thread (the exchange with that mail's correspondent — its author's mails and ours to them over ninety days, oldest first — for a mail no report claims), GET /v1/owner-reports/replies/{id}/files/{n} (one attachment of a desk's mail, as a download; every answer lists its files — name, type, size — kept whole up to 3 MB each and 8 MB a mail, ten at most). What ties a mail to a report is also read inside its attachments (a desk forwarding our notification to its customer as an attached message), in our report's own "Source IP:" line quoted back, and in a reference no pattern read (|4371961|, "chamado 12345"); a desk mailed once in two weeks answering with nothing of ours quoted is tied to that one report. subject replaces the one offered (GET /v1/owner-reports/{id} gives it as answer_subject, with answer_quotes naming the mail the answer will quote under the words, as a mail client does: the desk's last, else our report; a forward quotes nothing, it carries the mail whole). html is what the console's editor hands over: the controller keeps of it paragraphs, breaks, bold, italic, underline, links (http, https, mailto), lists and quotes — nothing else, no attribute but a link's address — sends that as the HTML part and draws the plain-text part from it (lists marked, quotes prefixed, a link's address after its words); text alone leaves as plain text. The person's signature (PUT /v1/me/prefs {signature}, Your account) is put under what they send. A machine's request for more (reporting guidelines) waits for nobody; the same words from the same desk as before are a form letter whatever the headers say.

rules: {except: [redirect-crawler, bad-bot], only: [ssh-*]} chooses which rules' bans are mailed (patterns as path.Match; every rule when empty; only wins). rule_texts: {rule: sentence} is what the mail says of a rule, over the rule's own report words. template is the mail's text with placeholders — {ip} {asn} {as_name} {date} {category} {target} {server} {server_ips} {rule} {rule_text} {hits} {lines} {org} {domain} {contact} {history} {abuseipdb} {tag} {xarf} {acknowledgement} ({tag} is the report's short name, SL-xxxxxxxx, the subject's own tag) — {history} is the address's previous bans on our servers, ten at most, one per line under a heading, nothing for a first offender; a line whose placeholder came out empty is dropped; empty for the shipped text. subject is the subject line likewise ({date_rfc} too), the [SL-…] tag always appended; empty for the shipped one (the facts one per line for the automata, one sentence, the lines, who says so, the Abusix acknowledgement — keep that line). POST /v1/owner-reports/preview {template, sanction_id} renders the mail a ban would get. registries: on keeps a local copy of the registries' dumps — the RIPE Database and the AFRINIC database, the two that publish abuse mailboxes (about 270 MB downloaded, a few hundred MB under <state>/registries/), fetched again every registries_every (7d; unchanged dumps cost one request each), rebuilt whole and swapped in; the abuse desks are then found there after Abusix and before RDAP (POST /v1/owner-reports/registries/refresh fetches now). Their terms allow the use; every mail addressed from them says which registry and under what terms. delay: 15s is how long a ban waits before its report leaves (fifteen seconds when unset), so the log lines that arrive late are in it (0 for none). every: 10m is the ceiling between two passes over the mailbox (five seconds at least) — the connection stays open and the server says when a mail arrives (IMAP IDLE), so an answer is read within seconds whatever it says; a connection that fails is retried after a pause that doubles up to five minutes, and a dial is bounded to twenty seconds; purge: 7d deletes from the mailbox, once an hour, the settled answers (seen) of the INBOX and every sent copy older than that — what a person has still to read stays, and everything stays on record (POST /v1/owner-reports/purge does it now). purge_sent: 30d gives the sent copies a delay of their own (empty: as purge; 0 keeps them). A purge deletes by batches of a thousand, a second apart, and at most fifty thousand mails of a folder a pass: a folder of hundreds of thousands of old copies empties over a few hourly passes, the mail server never re-indexing all of them at once. The folder a spam filter in front of the mailbox fills (the server's \Junk folder, else Junk or Spam under the INBOX) is read too, every ten minutes, with a cursor of its own: a bounce filed there is still a bounce, and the desk's next address gets tried.

One mail per banned address, never twice within a day, sent from reporter.contact through the SMTP relay. The abuse desk is the block's, not the network's: a registry publishes an abuse contact per block, and a network leases blocks to customers with desks of their own. It is resolved from the banned address and kept a month under the block the answer came with: the local registry copy first (the most specific block's abuse-c, offline), then the Abusix Abuse Contact DB (DNS — no block in its answer, so kept for the /24 or /48 around the address; when it names several desks, the block's own RDAP record says which), then RDAP. An address of your own for a network wins over all of it. GET /v1/networks/{asn}/owner lists the network's desks by block (blocks), POST /v1/networks/{asn}/contact {sample} looks the block of that address up again; when the desk bounces, the next address the registry publishes for the block (technical, administrative) takes over and the bounced report is sent to it, the bounced one remembered (tried); a 429 from a registry pauses RDAP for the Retry-After it gives (ten minutes otherwise; the settings say until when), one sample only is asked, and the miss is not kept; POST /v1/networks/{asn}/contact (look up again) lists them as alternates and POST /v1/networks/{asn}/contact/switch {email} picks one, which stays the registry's (a bounce moves on). An answer that quotes only the desk's case number is tied to the report an earlier answer opened that case for; an address of your own for a network replaces it. Every mail is on record (Lately in the panel, the network's page); POST /v1/owner-reports/send {sanction_id} mails one ban by hand, whatever the switches say.

The public unblock page — public: {unblock: on} in controller.yaml (or Settings → General → Unblock page, which writes the same keys — and listen.public, the page's own listener, bound on save) opens /unblock (no account; on its own listener the page is the bare address, / — /unblock redirects there): a visitor sees whether their own address — the one they come from, as the reverse proxy on the loopback says — is banned on the fleet, and lifts it themselves in one click (logged). After whitelist_after self-unblocks within an hour (3 by default) the page offers a whitelist request; anyone may ask "is this address banned" and ask for another address to be unblocked — those wait under Requests in the Web UI (its own menu entry, with the pending count; approve as a lift or as a fleet-wide exemption, or deny). whitelist: manual|lift| exempt says what becomes of a whitelist request — the visitor's own address only, the one the request comes from: manual (the default) waits for you; lift grants it at once as a lift (let in everywhere, a fresh start, the rules keep watching); exempt grants it at once as a fleet-wide exemption, for good. Granted requests show under Requests as approved by auto, and you are told by e-mail (a lift on the unblocks channel, an exemption on the requests channel). A request for another address is never granted automatically — unless that address is the one the request comes from (typed into the other-address form, or a dual-stack visitor whose page could not prove the family it detected): being the address is the proof, and it is lifted on the spot like a self-unblock, recorded as one. Off by default; the menu entry goes with it. Settings: captcha: off|builtin|turnstile (built-in = a small arithmetic question, no third party; Turnstile needs turnstile_site and turnstile_secret and loads Cloudflare's script), language: auto|en|fr (auto = the visitor's browser), title, footer, footer_url (the page's brand and last line — for embedding it on your own site), contact (shown to a person still blocked), email: off|optional|required (the page asks the visitor for an e-mail address before it acts for them — to know who unblocks themselves and reach them; kept with the request, shown under Requests and in the notification; required: nothing is lifted or asked without one), and the address detection, for a dual-stack visitor (usually banned twice, once per family, reaching the page over one of them): direct panel detection — ipv4_host and ipv6_host, two names of this Web UI answering over one family each (an A record alone, an AAAA record alone, the same proxy): the page asks each and unblocks there, the request's source is the address; or custom resolvers — ipv4_url and ipv6_url, two endpoints of your own, each reachable over one family only, answering JSON {"ip": "…"} (an optional "rdns" is shown; other fields ignored) with Access-Control-Allow-Origin for the Web UI's origin: the page learns both addresses there. With detect_secret (a secret you give the endpoints too) they answer beside ip a ts (unix seconds) and a token = hex(HMAC-SHA256(secret, ip + "|" + ts)): an endpoint signs only the address a request came from, so the token proves the visitor holds that address as surely as reaching the page over it — the page then shows both addresses as the visitor's own (log lines included) and one click unblocks both (POST /public/unblock {addresses: [{value, ts, token}, …]}, tokens good for ten minutes). With detect_secret set, the controller signs too: GET /public/detect answers the caller's own address the same way, to any origin — on the per-family names, what a customer portal's visitor's browser calls to prove both of its addresses (CLIENT-VIEW.md, "Both families"). A portal on another origin reading your own ipv4_url/ipv6_url needs them to allow its origin. In PHP, for instance: echo json_encode(['ip' => $ip, 'ts' => time(), 'token' => hash_hmac('sha256', "$ip|" . time(), $secret)]); (compute time() once). Without the secret, the page shows the status of the other family's address (GET /public/me?value=, no log lines) and, as nothing proves it is the visitor's, offers to ask for its unblock — a request the operator decides; the controller lifts on the visitor's word only the address their request comes from. Hosts win over URLs when both are set. Every action is rate-limited per address and a refusal is logged as msg="public page refused" why=rate|captcha ip=…; the shieldlist-console pack's shieldlist-unblock-abuse rule bans an address that hammers it. API: GET /v1/requests?all=1, GET /v1/requests/count, POST /v1/requests/{id}/approve {action: lift|exempt} or /deny, GET|PATCH /v1/public.

Notifications (mail) — mail: {smtp: host:port, user, password, from, security} in controller.yaml (or Settings → General → Mail, with a test button) is the relay the controller sends through — 587 STARTTLS or 465 TLS by the port, security: none for a trusted local relay, authentication when user is set; never a delivery of its own. Who receives is per feature, by account: public.notify_requests: [alice, bob] names the accounts mailed (at the e-mail each set on their own account) when a request from the public page waits for a decision, public.notify_unblocks when a ban is lifted; an account without an e-mail is skipped. public.notify_unblock_sources says which lifts are mailed, by source: public (the public page), portal (a customer portal), request (a request approved), whitelist (a whitelist granted), manual (a lift by an operator or an API token), exemption (an exemption with its lift); absent, the first four; [], none. A lift of many addresses at once is one mail listing them.

Webhooks — webhooks: [{name, url, secret, sources?, events?, off?}] in controller.yaml (or Settings → General → Webhooks, which makes the secret and shows it once): each lift is POSTed as JSON to every webhook whose sources (same words, same defaults) include its source, signed with HMAC-SHA256 of <timestamp>.<body> under the webhook's secret (16 characters at least) in X-Shieldlist-Signature; retried after 30 s, 5 min and 30 min, each attempt in the activity log. The format and how to check the signature: the API wiki page, Webhooks. One try and a retry, the failure in the log; a mail never holds a request up. The unblock mail says why the address was banned: each cause in force — the rule, the machine where it fired, its log lines — then the machines that only applied it because they share the rule's bans. public.show_lines: off hides from a blocked visitor the log lines that earned the block (their own requests, shown by default, the machine's name in them replaced by [server]); public.show_rule: off hides what blocked them — each rule in force, said no further than its abuse report says it (the report preset's brief, else its says; a rule never reported reads "Blocked by the servers' protection"), the sites its lines were about and when (shown by default). The rule's name and description, written for the operator, never reach the visitor. Nothing the visitor reaches — the page, its endpoints, their mail — names the machines holding the ban, nor says how many. A visitor who gave an e-mail address and unblocked themselves is mailed that same detail once, in the page's language (public.mail_visitor: off sends nothing; at most 60 such mails an hour, apart from the operator's notifications). API: GET|PATCH /v1/mail, POST /v1/mail/test (to the caller's own address, or ?to=).

Reverse DNS — GET /v1/rdns/{address} looks the name up from the controller (two seconds, remembered an hour); the address dialog shows it beside the address, without waiting.

Reputation (AbuseIPDB) — with a secrets.yaml in the controller's tree (abuseipdb: {key: …}, the same shape as an agent's) the Web UI can ask what the provider knows about an address before a ban by hand (GET /v1/reputation/{value} — from the store when checked within a day, ?fresh=1 asks again, ?cached=1 never asks; each question spends one of the account's daily checks, counted apart from reports), and the controller asks daily about every address the servers carry — the machines say their global addresses, both families, on each sync — the worst score on each server's card, every address with its score on the server's page (GET /v1/agents/{host} → addresses, POST /v1/agents/{host}/reputation/check asks now; GET /v1/reputation/own and POST /v1/reputation/own/check for the whole fleet). A score above reputation: {alert_above: N} in controller.yaml (percent; absent = 0, any report at all) is mailed to the accounts under reputation: {notify: [...]} (Settings → General → Notifications; the threshold under Settings → Reporting → AbuseIPDB): once, again when it rises, forgotten when it falls back under (PATCH /v1/reputation/own {alert_above, notify}). Nothing else is checked automatically.

Clocks — every sync carries the agent's clock; the controller keeps the difference (clock_skew on GET /v1/agents, seconds, agent minus controller) and the Web UI warns past thirty seconds ("clock off by 2m"): a machine that disagrees about the time disagrees about every window, every ban's end and its place on the charts. The agent warns on its side too (shield status: controller_clock). Fix NTP; nothing else is adjusted for it.

Updates — updates: off stops the daily question to git.lrob.net about the latest releases; on, the Web UI says when a newer controller or agent is published (a notice, never a download).

License — a license opens the download of the paid rules; the engine and the free rules never depend on it, and nothing of it stands between a detection and a ban. It is entered in the Web UI (Settings → License): the key, the address it is bound to (the machine's own public address it leaves from is proposed), a connection test that shows the address the licence server sees, then the activation, in both address families when the machine has them. Nothing is sent until a key is entered. Then, at start and every few hours, the controller asks for a lease, sending the key, an installation identifier drawn at random at activation, its version, a random nonce and the previous answer's token — nothing else: no logs, no addresses, no machine names. The server sees the address the request comes from; the license is bound to it, and the controller always leaves from it. Every answer is signed and verified against the public keys built into the controller; an answer that does not verify counts as no answer, and no answer never cuts anything off: the current lease (48 hours) runs to its term. What is kept is licence.json in the state directory (mode 0600: the key, the installation identifier, the last lease). When the paid features end, the paid rules already installed stay in place, no longer updated.

The paid rules come from our download point while the lease opens them: after each lease request and every paid.every, the controller fetches the signed manifest of its channel (with the key and the installation; the download point asks the licence server about every request), checks its signature against the content keys built in, its sequence number (never older than the one applied), and every file it lists (rule language only — parsers, rules, policies, reports, packs — one level deep, size and SHA-256). Only the files that changed are downloaded; the package goes in place whole, under the state directory (paid/, read between the package's library and this tree), and the tree is reloaded; if it does not load, the previous paid rules come back and the running configuration never changed. They are read only in the Web UI (shown as premium): a copy into this tree under the same name replaces one. When the licence stops opening them, they are frozen: they stay in force as they are, and the console says so on every page until it is solved.

license:
  server: https://license.shieldlist.eu       # the default
  status_url: https://license.shieldlist.eu/  # the "status of our services" link
  alert_after: 24h                            # how long our servers may stay silent before the console says so
  request_timeout: 45s                        # one lease request
  retry_max: 1h                               # after a silence, retries at 1, 2, 4… minutes, at most this apart
  paid:                                       # every key has its default
    url: https://shieldlist.eu/paid/v1        # the download point
    channel: premium
    every: 6h                                 # a check, besides one after each lease request
    timeout: 60s                              # one request
    max_files: 500                            # what a package may hold
    max_file_kb: 1024
    max_total_kb: 32768

A machine's own exemptions — exemptions: in agents/<host>.yaml ([{ip|range, until?, note?}]), assembled into its bundle as exemptions.d/machine.yaml; the Web UI writes them (Exempt… → only this server) and removes them.

Where addresses are from — geoip: in controller.yaml. The files the controller holds are served to its agents: every sync carries their content hashes, an agent holding another edition (or none) fetches them under its state directory (/var/lib/shieldlist/geoip/) and loads them — no configuration on the machine — which is what the rules' countries: / asns: and the exemptions by country or AS run on. A standalone agent names files of its own in agent.yaml (geoip: {country: …, asn: …}). Either source: dbip (the free DB-IP lite country and ASN databases, fetched monthly under <state>/geoip/, licence CC BY 4.0 — the Web UI shows "IP Geolocation by DB-IP"), or files of your own: country: and asn: naming MaxMind-DB files (GeoLite2 or any provider's). Off unless configured. Sanctions are enriched as they arrive (country, AS number and name); rows from before are backfilled; the Web UI shows a flag and the network, filters and counts by them.

The Web UI is served at / on listen.api. Home: an address lookup and the sanctions as they land — a live feed (play/pause) filtered by state (banned now, bans, detections, expired, lifted), server, rule and dates, as many rows as asked, the fields of your choosing, the requests behind each sanction a toggle away. Servers: each machine with four tabs — overview, its bans (the same feed, for it), its rules (the fleet's defaults at its level or its overrides, changed or reset per rule) and its settings. Rules and Exemptions are the fleet's; Activity is who did what; Web UI is the panel itself — people, tokens, the configuration files, this browser's preferences. An address opens as a dialog wherever it appears: banned where, its history, each sanction's convicting lines, and the two actions — lift (the reason is optional) and exempt (the red one: never sanctioned again while it lasts), each able to withdraw what was reported about the address. People sign in with a name and password — shieldlist-controller account -name NAME creates the first account at the Web UI, account -name NAME -totp enrols a one-time code — or by pasting an API token. Sessions last twelve hours; every action is audited under the person's name.

The API answers on listen.api (localhost by default; on the network, put it behind TLS you control), JSON, with API tokens: shieldlist-controller api-token -name NAME mints the first one at the Web UI, POST /v1/tokens the next. shield -controller URL -token T (or SHIELD_CONTROLLER, SHIELD_TOKEN) is its client: agents, agent <host>, set <host> key=value… (level, state, lift, reporting, offer, enforce, description, packs=a,b, rules.<rule>.{level,threshold,state,ban}, rules.<rule>=none), rules, rule <name> key=value… (state, threshold — 5/10m or 3/1m, 20/1h — ban, report), why, unban [-agent] [-withdraw-report], exempt [-lift [-withdraw-report]], reload, validate, audit, token, sources, refresh, version. Every write is a write to the files — agents/<host>.yaml created or edited in place, the rule's own file edited in place, comments kept — reloaded whole or reverted with the loader's errors as the answer. Endpoints: GET /v1/version, GET /v1/agents[/{host}], GET|PATCH /v1/agents/{host}/declaration (level, state, lift, reporting, offer, enforce, description, packs: [{name, state, level}], logs: [{path|unit, log, ports}], rules: {name: {level|threshold, state, ban} | {} to add | null to drop}), GET /v1/agents/{host}/rules (what the machine runs: each rule with the packs that brought it, its threshold there and why, its state, outcome), the rule language — GET /v1/packs, POST /v1/packs {name, description, rules}, PATCH /v1/packs/{name} {description, rules}, DELETE /v1/packs/{name} (refused while a machine is given it); GET /v1/rules (each with its parsers — {parser, weight} or {regex, prefilter, inline} —, threshold, ban, notify, report, count, state, share, the packs listing it, the servers running it), POST /v1/rules {name, dir, category, description, log, parsers, threshold, ban, notify, report, count, distinct, state, share}, PATCH /v1/rules/{name} (any of those; parsers replaces the list; ?preview=1 on either answers {path, before, after} without writing — the diff the Web UI shows), DELETE /v1/rules/{name}; GET /v1/parsers (inline ones marked with their rule), POST /v1/parsers {name, dir, log, prefilter | prefilter_any, regex, time_field, time_format}, PATCH|DELETE /v1/parsers/{name}, POST /v1/parsers/test {regex, prefilter, prefilter_any, lines} (each line: gated, matched, the fields captured); GET /v1/policies, POST /v1/policies {name, durations, ports (all | service | "80, 443"), memory, tighten, duration_start, reputation ("90/30d")}, PATCH|DELETE /v1/policies/{name}; GET /v1/reports, POST /v1/reports {name, to, when, categories, says, include}, PATCH|DELETE /v1/reports/{name} (editing the built-in default writes reports/default.yaml); GET|PUT /v1/files/{path} (one file of the tree whole — the "edit as file" view; ?validate=1 on PUT tries it through the loader and puts it back) — every write a file created, edited in place or removed, reloaded whole or reverted; POST /v1/agents/{host}/resync (the machine sends its whole history again, evidence included — a machine enrolled again does so on its own), GET /v1/sanctions?state= &agent=&rule=&q=&country=&asn=&since=&until=&limit=&offset=&evidence=1 (newest first, bounded; state is active, bans, recorded, expired, lifted or all; rule contains; q is one search — an address or its start, a rule, a server, a country code, an AS by number or name; since/until RFC 3339 on the start; evidence=1 adds each sanction's convicting lines), GET /v1/sanctions/facets?…&n=&hits=1 (same filters: top countries, networks, rules and usernames, n ≤ 300, the offenders being counted tallied in with hits=1 — the Web UI's panel and map), GET /v1/geoip (what is loaded, the attribution), GET /v1/sanctions/series?…&window=24h&step=30m&since=… (counts per step, bans and detections apart — the Web UI's chart; since inside the window answers the tail alone, on the same grid), POST /v1/bans {value, agent?, duration?, reason?, report_as?, lines?} (a ban by hand: on one machine or every enrolled one, duration like 6h, 1y, or permanent; applied by each agent at its next sync through the same checks as any sanction, recorded as rule manual with the reason as its evidence, reported when a preset is named — with the facts of the detection's lines when given, as the rule's own report would), GET /v1/presets (the report presets a manual ban may be reported as), GET /v1/exemptions (every exemption in force with its origin — the fleet's files, the sources, the Web UI's file, a machine's declaration — and whether the Web UI may remove it), DELETE /v1/exemptions {value, agent?}, POST /v1/exemptions {…, agent?} (one machine's own), PATCH /v1/sources {enable, disable, refresh}, POST /v1/sources/custom {name, url, format, note}, DELETE /v1/sources/custom/{name}, GET /v1/updates, GET /v1/watched?agent=&q=&country=&asn=&value=&exempt=1&limit= (the offenders the agents are counting but have not convicted — how far from a ban, as of each agent's last sync; offenders exempt on their machine carry exempt (why) and are listed only with exempt=1), GET /v1/networks/{asn} (an autonomous system's name and prefixes from the ASN database), GET|PATCH /v1/me (who is asking; a person may change their own password and email), GET /v1/sanctions/{id} (one, lines included), GET /v1/offenders/{address} (its whole history, lines included), POST /v1/lifts {value, agent?, reason?, withdraw_report?} (withdraw_report asks the machine to withdraw what it reported to AbuseIPDB about the address — the provider's clear-address, every report of the account about it), POST /v1/exemptions {ip|range, for?, note?, lift?, withdraw_report?} (a write to exemptions-cli.yaml, reloaded whole or reverted; lift also lifts the bans in force wherever they are), GET /v1/me, GET /v1/config, POST /v1/config/{reload,validate}, GET /v1/sources, POST /v1/sources/{name|all}/refresh, GET /v1/audit, POST /v1/join-tokens, GET|POST /v1/tokens, DELETE /v1/tokens/{name}, GET|POST /v1/accounts, POST /v1/accounts/{name}/{password,totp}, DELETE /v1/accounts/{name}[/totp]. Every action is audited under the token's name.

At the Web UI, without the API: shieldlist-controller token [-uses N] [-expires 24h] mints a join token; agents, why <address> and `unban

[-agent HOST]` read and write the store directly (a Web UI lift lands at the machine's next sync, an API lift within the second). `SIGHUP` reloads the tree — whole or not at all — and pushes the new revision to every connected agent.

Several parsers, one jail

parsers: takes a parser name, a list of names, or weighted entries — [ssh-auth-fail, {parser: ssh-preauth-abort, weight: 2}]. Every hit of any of them counts for the rule (one event, one hit: do not list two parsers that both match the same line of the same attempt).

Reporting again while the attack goes on

reporting:
  provider: abuseipdb
  renew: 24h        # an address still attacking while banned is reported again after this long; `never` turns it off

A ban that is extended because the hits keep coming (check 5) reopens its report once the last one is older than renew — the sender picks it up on its next pass, with the latest hit as the report's time. A report that never left is not renewed: its one chance was taken.

Compact scalars

Form Meaning
30s, 10m, 2h, 1h30m, 30d, 4w durations (days and weeks on top of Go units)
5/10m a threshold: points within a window
3x, 0.5x evidence multiplier
FR / AS3215 / 198.51.100.0/24 origin, auto-detected