Status JSON
sudo ipfence status --json prints one object. schema_version is 1; it changes
only if a field changes meaning or is removed. Times are RFC 3339 in UTC. Fields
that do not apply are omitted.
Top level
| Field | Type | Meaning |
|---|---|---|
schema_version |
number | 1 |
generated_at |
time | when the report was made |
daemon |
object | daemon |
config |
object | path, found, warnings |
detectors |
array | detectors |
enforcement_enabled |
boolean | whether blocking is on |
firewall |
object | firewall, read live |
firewall_error |
string | last firewall failure |
active_bans |
array | bans; includes observed entries |
recent_history |
array | up to 20 ended bans |
allowlist |
array | address, source (built-in, this-host, config, command), note |
local_counters |
object | name to number, see Counters |
behind_proxy |
array | service, proxy, reported_visitor, count, last_seen |
degraded |
array of strings | problems |
notes |
array of strings | environment facts and unsupported things |
vpn_interfaces |
array | name, kind, addresses |
docker |
object | version, logging_driver, firewall_backend, iptables_variant, running_containers, containers_publishing_ports |
daemon
running (boolean); when running also pid, version, started.
detectors
| Field | Meaning |
|---|---|
service |
ssh, nginx, caddy |
detected, source, parser, packet_path |
each { "state": "yes"|"no"|"unknown", "detail": "..." } |
will_activate |
discovery's verdict |
unsafe |
the log's addresses cannot be trusted |
missing |
reasons it is not active |
state |
active, unverified, waiting, degraded, disabled, ready (daemon not running) |
readers |
readers, daemon only |
readers
source, state (starting, reading, waiting, error, stopped),
last_error, records_read, failures_matched, records_unparsed,
records_dropped, last_record, notices.
firewall
| Field | Meaning |
|---|---|
state |
absent, owned, drifted, foreign, other-install, unavailable |
problems |
why |
chains |
name, hook, priority, policy |
sets |
name, entries |
kernel_counters |
chain, set, packets, bytes (reset on rebuild and reboot) |
bans
| Field | Meaning |
|---|---|
address |
address or CIDR |
origin |
auto, manual, escalation |
service, reason, offense |
|
observed_only |
a dry-run decision; nothing is blocked |
enforced |
in the firewall (false if the table is not currently ipfence's) |
permanent |
no expiry |
created_at, expires_at |
expires_at omitted if permanent |
remaining_seconds |
for active timed bans |
enforce_error |
why not enforced |
ended_at, end_reason |
history only |
A real example (shortened)
JSON
{
"schema_version": 1,
"generated_at": "2026-11-29T02:43:00Z",
"daemon": {"running": true, "pid": 1083, "version": "0.1.0", "started": "2026-11-29T02:42:18Z"},
"enforcement_enabled": true,
"firewall": {
"state": "owned",
"chains": [{"name": "input", "hook": "input", "priority": -10, "policy": "accept"}],
"sets": [{"name": "ban4", "entries": 1}, {"name": "allow4", "entries": 6}],
"kernel_counters": [{"chain": "input", "set": "ban4", "packets": 15, "bytes": 896}]
},
"active_bans": [{
"address": "203.0.113.50",
"origin": "auto",
"service": "ssh",
"reason": "5 SSH authentication failures within 10m (latest: failed-password)",
"offense": 1,
"observed_only": false,
"enforced": true,
"permanent": false,
"created_at": "2026-11-29T02:42:53.358Z",
"expires_at": "2026-11-29T02:57:53.358Z",
"remaining_seconds": 893
}],
"local_counters": {"bans.auto": 1, "bans.observed": 1, "events.counted": 10, "events.seen": 10}
}Scripting examples
Shell commands
# addresses currently blocked
sudo ipfence status --json | jq -r '.active_bans[] | select(.enforced) | .address'
# exit non-zero if anything is degraded
sudo ipfence status --json | jq -e '(.degraded // []) | length == 0' >/dev/null
# is the daemon running and enforcing?
sudo ipfence status --json | jq -e '.daemon.running and .enforcement_enabled' >/dev/null