Sentinel operator guide
Sentinel is a firewall and router for x86-64 UEFI systems. Fabric applies packet policy, Wren exchanges routes, and Sentinel turns one appliance configuration into both. Operators make live changes from the CLI or web console. System software arrives as a separate A/B image.
| What do you want to verify? | Start here | What to look for |
|---|---|---|
| Try the appliance on a workstation | Start a VM | Log in and inspect both interfaces. |
| Change a remote firewall safely | Apply a change remotely | An unconfirmed change returns to the saved configuration. |
| Find the rule that decides a packet | Trace a packet | Follow NAT, the configured route and the matching rule before sending traffic. |
| Choose how an HA pair elects a primary | Compare the two HA modes | Verify the active member and how each mode handles a partition. |
| Review an image before rollout | Stage an update | Verify the offer and distinguish a staged image from a successful boot. |
How the parts fit
flowchart LR
op([Operator]) -->|CLI / web console| sentinel[Sentinel<br/>config + commit]
sentinel -->|packet policy| fabric[Fabric agent<br/>eBPF/XDP data plane]
sentinel -->|routing config| wren[Wren<br/>routing daemon]
wren -->|routes| kernel[(Kernel FIB)]
fabric -->|forward / drop| nic{{NICs}}
image[[Signed A/B image]] -.->|update| sentinel
First look on an appliance
sentinel show version
sentinel show interfaces
sentinel show ip route
Use the configuration cookbook for the next change. The test catalog identifies which checks exercise the CLI, a development VM or a booted image. This manual tracks the repository’s main branch; match the source revision to your release when evaluating a build.
Release status
This documentation describes Sentinel 1.0.0. Read the release notes before upgrading. HA and extended routing features remain experimental; consult the HA safety guide, routing qualification status and dataplane support matrix. Source-build signing keys are demonstration identities. Source tests cannot replace acceptance and SBOM/CVE review of the final signed image.
The source license is AGPL-3.0. Do not infer additional contributor licensing rights from a proposed CLA or commercial roadmap; see redistribution notices.
Sentinel 1.0.0 release notes
Sentinel 1.0.0 is the first release of the appliance with a stable configuration language, signed A/B image updates and a qualified firewall and NAT data plane. It follows 0.4.2 and replaces the 1.0.0 candidate of 2026-10-26, which was never released. Everything that changed is listed in the changelog; this page says what an operator has to know before upgrading.
The release closes the findings of the independent 1.0.0 release audit of
2026-11-18/19. Finding identifiers (DP-…, CTRL-…, HA-…, IMG-…, PROV-…)
are cited where they explain a change.
Before you upgrade
- Check the saved configuration with the 1.0.0 CLI first. Export it from the
box and run
sentinel config check appliance.tomlwith the 1.0.0 CLI off-box, or stage the update and read the trial boot's report. 1.0.0 refuses several configurations that earlier releases accepted (list below). - Plan one outage per HA pair (next section). An HA upgrade is not hitless.
- Rotate a weak config-sync secret before you upgrade, with
sentinel ha secret generate, on both members. - Keep console or out-of-band access for the first boot. The update keeps the previous image as the fallback slot; do not bless the new slot before you have checked management access and forwarding.
Upgrade warnings
HA pairs: one failover outage and one state reset per upgrade
Zone policy identifiers are now stable hashes of the zone name instead of the
zone's alphabetical rank (DP-13), and a rule without direction now compiles as an
ingress rule (DP-15). Both are part of the shared-policy digest that decides
whether the standby is ready. While the two members run different versions:
- the standby reports
not ready: policy differs, and conntrack sync refuses its sessions (safely; nothing wrong is installed). This holds for every pair: before 1.0 a ruleto firewallalso entered the digest with each member's own addresses (HA-02), so no pre-1.0 member agrees with a 1.0 member while the versions differ; - the switch-over to the upgraded member is therefore an outage with loss of every established connection, not a warm failover. Expect it once per upgrade;
- after the upgrade, the first commit reloads the data plane once with fresh state, because the stored policy identifiers change. Make that first commit in the same maintenance window.
Upgrade in this order, and do not leave a pair half-upgraded:
- upgrade the standby and let it boot and bless its slot;
- fail over to it (the outage above);
- upgrade the old primary;
- commit once on the active member.
Never fail back onto a member that is not yet upgraded. A masqueraded
connection owned by a 1.0 member does not survive a takeover by a pre-1.0 peer:
the older allocator looks for its public port in a different place and breaks the
connection. Between members whose readiness digests agree (from 1.0 on), the other
direction is covered: connections the older member owns survive the switch-over
to the upgraded one (checks.ha-napt-mixed-version). An upgrade from 0.4.2
does not meet that condition (above). While the versions differ, do not change
accounts, AAA, update channels, SSH, console, BGP update-source or PPPoE
local-address on either member (HA handbook).
Configurations 1.0.0 refuses
sentinel config check, commit and save refuse these. What happens at boot is
stated per item.
| Change | Refused | At boot |
|---|---|---|
Port forward or load balancer with a protocol other than tcp, udp or tcp_udp; two load-balancer services on one zone, protocol and port (DP-18) | yes | the saved file fails validation (see below) |
| A data-plane table over its capacity: more than 8,192 rule-trie entries (a rule without an address counts once in each source trie), more than 127 rate-limited rules, a global blocklist that exceeds 262,144 entries once copied into every zone, MAC rules, forwards, SYN proxy entries (DP-17, DP-29, PERF-03) | yes | boots the last-known-good or management-only configuration and says so |
A rule without proto that also names a source, destination, group, family, direction, ICMP type or log, or that a zone's explicit default-action overrides (DP-14) | yes | the qualifier, or the inert rule, is removed and reported |
Control characters (tab, CR, NEL, U+2028/2029) in any string, and malformed values in fields that reach daemon configuration files: SSH log level, DHCP host-name, bond hash policy and LACP rate, dynamic-DNS login and password, NTP allow-from, PPPoE subscribers and client password, update subscription key, sysctl keys, DNS TXT records (CTRL-02, -03, -08, -13, -16 to -18, -29) | yes | the setting or service is switched off with an error line; the rest boots |
| A config-sync secret shorter than 32 bytes or guessable (CTRL-01) | every change is refused until it is rotated | boots and keeps pairing; warns at every apply |
A drop/reject rule with a non-local to zone, when the rule, a zone or an interface changes | yes | unchanged rules still load |
syn-protect on a zone that is not stateful (set firewall global stateful false, or a zone's own stateful false): a proxied connection lives exactly as long as its connection state, and a stateless zone keeps none. Fix: make the zone stateful again, or remove its accept rule for the port so the proxy is not scoped to it | yes | boots the last-known-good or management-only configuration and says so |
If the saved file fails validation at the first boot of 1.0.0, there is no
last-known-good file yet (1.0.0 records it after its first healthy boot), so
sentinel-boot fails. The trial boot then fails its health assessment and the
loader returns to the previous image after its counted attempts. Fix the
configuration on the old image and stage the update again.
Packet handling that changed
- IPv4 options (DP-34): TCP and UDP packets whose IPv4 header carries options are dropped on stateful zones; they cannot be tracked, proxied or translated. Stateless zones still judge them by their rules.
- Rule direction (DP-15): a rule without
directionmatches arriving traffic only.from wan proto tcp port 25 action dropno longer stops LAN hosts sending mail. Usedirection bothfor the old meaning. - Blocklists and GeoIP name sources (DP-15): a zone or global blocklist and
geoip-blockrefuse what a listed address sends in, and nothing else. They no longer stop LAN hosts reaching a listed address, and the answers to such connections are let back in. There is no outbound blocklist in 1.0: to keep the inside from reaching listed addresses, writedirection outrules. - SYN proxy scope (DP-31):
syn-protectproxies a port only on the zones that admit it (an accept rule, a port-forward or a load balancer), so LAN clients' outbound connections to that port are no longer proxied. A port that no zone admits that way stays proxied everywhere, andconfig checksays so. - IPv4 rules no longer match IPv6 (DP-11): a rule on
0.0.0.0/…used to apply to all IPv6 traffic as well. If IPv6 was blocked only by such a rule, it now passes. Review the IPv6 policy. block-icmp(DP-10): refuses new inbound ICMP only. Echo replies and ICMP errors about tracked connections (packet-too-big included) pass, outbound ICMP is not affected, and IPv6 neighbour discovery and MLD always pass on every zone.- RELATED ICMP is delivered (DP-10, DP-21): a UDP probe to a closed port now receives its port-unreachable at once; IPv6 path-MTU discovery works.
- Fail-closed zones (DP-22): non-IP EtherTypes other than ARP, 802.1Q/802.1ad, PPPoE, LLDP, EAPOL, slow protocols and MACsec are dropped.
- TCP state (DP-03, DP-08, DP-25, DP-37): out-of-window RSTs are ignored; XMAS, NULL, FIN-only and out-of-state packets are dropped on stateful zones; non-SYN TCP no longer creates NAT state.
- Duplicate rules (DP-30): two rules on one zone, protocol, port and address
hold the stricter verdict in the data plane, as
sentinel tracereports. - NAT (DP-04, DP-05, DP-23): GRE, ESP, SCTP and 6in4 are masqueraded instead of leaking the private source; AH, ICMP timestamp and ICMP with options are dropped at WAN egress; IPv4 fragments are translated; hairpin NAT rewrites the client port. A new masqueraded connection examines a fixed window of 128 candidate ports, so the connection rate no longer collapses after an ICMP echo or a port-forward (DP-26, PERF-02).
HA behaviour that changed
- Failback waits 10 s (witness mode): a higher-priority member with
preempt = truetakes ownership back only once the current owner has held it for 10 s. Failover is not delayed. Earlier, a member whosewrenhad just restarted took the pair back 3 to 4 s after the fault. A WireGuard takeover still waiting for a handshake retry then lost the pair before it forwarded, so one fault cost two handovers (3.95 s of outage). The hold is fixed in 1.0 and cannot be configured. The witness enforces it, so a pair gets it once its witness runs 1.0, whatever version the members run. Two-node mode (no witness) is unchanged. - A takeover no longer drops packets on the new owner: every VRRP virtual
address now counts as a local destination on both members, whether or not
the member holds it. So taking the VIPs no longer rewrites the rule set with
the configuration gate closed, which dropped 1 to 6 forwarded packets. A VIP
whose prefix length the interface does not already carry (a
/32VIP, or one outside its subnets) still takes the rewrite. - VIPs follow the lease: with a lease, a member renews it only while its data-plane agent reports fresh (100 ms) and eligible. It gives up its VIPs when the lease ends, at most about 0.45 s after the agent stops. One late report no longer withdraws them.
Credentials and management
- The config-sync secret is no longer a full-access API bearer (CTRL-01, CTRL-07).
On the first apply, an API token file equal to the secret is replaced by a fresh
random token. Scripts that used the secret as a bearer receive
401/403; use/var/lib/sentinel/api-token. - Config sync no longer carries accounts, groups, AAA, update channels and keys,
SSH, the console, BGP
update-sourceor PPPoElocal-address(CTRL-09, CTRL-10). Configure them on each member. savewrites the committed running configuration and refuses while the session has uncommitted edits (CTRL-14). Scripts of the formset …; savemust commit first.- An IPsec pre-shared key containing a backslash is now written escaped, so the effective key changes; set it again on the peer (CTRL-29).
- Staging an unversioned local update proof (a signed digest or a raw
signature) requires
--allow-downgrade; use the release's signed manifest instead. No slot can be written during an unblessed trial boot (CTRL-11, CTRL-26). - Self-hosted update channels: signed channel metadata must carry a freshness policy (channel, architecture, sequence number, issue and expiry time, at most 14 days apart). 1.0.0 refuses metadata without one, a sequence lower than one it has seen, and a sequence reused for different bytes, so a channel must be re-signed at least every 14 days.
savenever confirms a pendingcommit-confirm: while one is pending, every write,saveincluded, is refused until youconfirmor the trial reverts.- An operator in
wheelwho openssentinel configureon the box now gets one root session throughsudo(oneconfigureentry in the sudo log) instead of one sudo call per step; commits take seconds instead of half a minute. Accounts outsidewheeland--no-applysessions keep their own privileges, so a--no-applysave cannot replace the box's root-owned configuration.
State survives an agent restart
Sentinel now asks the data plane to persist its hooks and state tables
([state] persist = true, DP-12, DP-27): an agent restart, crash or reconfigure
keeps enforcing and keeps NAT sessions, and zoned links are no longer held down
while it restarts. Connection-state tables are sized from the box's memory and
hold at least 16,384 connections, so a larger box
uses more kernel memory for them than before (DP-06). The SYN proxy's records now
end with their connections (the agent removes a record no live connection state
claims), and its table is sized for two records per connection instead of one
per two, so on the same memory the default sizing holds about 7 % fewer
connections. The tables' layout changed with it: the first agent restart after
the upgrade starts with fresh state instead of adopting the pinned tables
(pinned state never survives the upgrade's reboot either).
Known limitations
-
Routes added by hand with a routing protocol's tag. A route added outside the configuration with a protocol Wren uses (
proto static,bgp,ospf,rip,isisorbabel) is treated as Wren's and removed at its next reconcile. Add manual routes with another protocol, such as the defaultbootof a plainip route add(routing handbook). -
SYN proxy and source-port reuse. The proxy's record of a connection is removed by the agent once no live connection state claims it, within about 30 s of that state ending (at once after a reset, after the closing timeout after a normal close). A client that reconnects from the same address and port inside that window, to a protected service whose server uses the same port, is not admitted until it retries after it (firewall handbook).
-
Switching the SYN proxy on or off cuts that port's open connections. The proxy admits a connection only through its own handshake and keeps a record of each one it admitted. A connection already open when
set firewall syn-protect <port>is committed has no record: its next segments are refused as forged handshake replies, and it stalls until the client gives up and reconnects. Removingsyn-protectlikewise ends the connections the proxy had admitted, because their sequence numbers are no longer translated. The same applies to proxied connections whenever the agent starts with fresh state instead of its pinned tables, as on the first restart after this upgrade. Connections opened afterwards are proxied normally. Changesyn-protectin a maintenance window, or expect that port's clients to reconnect. -
A commit can be refused while the box is starved of CPU. A commit that restarts the data-plane agent waits for it to report ready, and each check of that is bounded to a few seconds. On an appliance whose CPU is saturated (for example during a flood) one check can run out of time. The commit is then refused with
readiness probe timed outand rolled back to the previous running configuration, so nothing is left half-applied. Repeat the commit once the load has dropped. -
IPv6 is not SYN-proxied in 1.0. The SYN proxy protects IPv4 only (DP-35). Where a protected port is reachable over IPv6,
config checknames the zones. IPv6 SYN proxying is planned for 1.1. -
Masquerade port ceiling per remote endpoint. One public address carries about 31,000 concurrent connections to one remote ip:port; beyond that new connections are refused and counted in
egress_nat_no_candidate(show firewall statistics). No NAT can exceed 32,768 per public address and endpoint; a closed connection holds its port for the closing timeout (30 s), so one address sustains roughly a thousand new connections per second from fresh client ports to one service. Masquerade in 1.0 uses the one address of each uplink and has no address pool, so the remedy is another masquerading uplink (firewall handbook). -
Masquerade waits for the uplink's address. For up to about 2 s after boot or after an uplink's address changes, until the agent has picked up the new address, traffic that needs masquerading on that uplink is dropped, never sent out untranslated.
-
Rule capacity. At most 8,192 rule-trie entries per address family; a larger rule set is refused at
config checkandcommitwith the capacity named, and a saved file over the limit boots the last-known-good configuration. -
A policy commit pauses the data plane briefly. A commit that changes the data-plane policy closes the configuration gate for the transaction: about 20–30 ms for up to 4,500 changed rule entries in our tests. Every attached link drops traffic meanwhile, the HA sync link included, so on an HA owner the commit also costs about one witness renewal; the owner keeps its lease (HA handbook).
-
No bulk removal of the global blocklist.
delete firewall global blocktakes one entry; there is no command to clear a large blocklist at once in 1.0. Remove entries in one batch session and commit once. -
IPv4 options in TCP and UDP are refused on stateful zones (DP-34, above). Traffic that needs them must cross a zone with
stateful false; other protocols (IGMP router-alert, for example) are not affected. -
No outbound blocklist (DP-15, above). IPv6 is not NAT-translated for fragments; IPv4 fragments that arrive before the first fragment are dropped (DP-05).
-
A NIC that strips 802.1Q tags in hardware makes the parent's zone judge VLAN traffic under native XDP (DP-22). Turn
offload rxvlanoff on such a parent. -
hairpin trueon a DHCP or PPPoE WAN does nothing yet (DP-39;commitwarns). -
NIC names follow PCI slots; give zoned NICs an
hw-id(PROV-04;config checkwarns). -
A commit interrupted by SIGKILL, out-of-memory or power loss is not rolled back (CTRL-15 covers signals, I/O errors and panics).
-
HA remains experimental: its VM checks cover election, failover with state and the masquerade and SYN-proxy failovers, not every partition or witness-loss case. Rolling upgrades are not hitless (above), and the witness is a single point of authority by design.
-
HA with WireGuard steps a lagging clock forward on takeover. Both members answer WireGuard peers with one identity, and a peer accepts a handshake only with a newer timestamp than the last. A member whose wall clock fell behind (a hypervisor pause or migration) therefore steps it forward to its predecessor's after taking the VIPs and before reconfiguring WireGuard, and tunnels follow the takeover in about a second. A small helper with only
CAP_SYS_TIMEtakes the step, not Wren. The step is forward-only and logged. It is refused beyond 10 minutes, beyond 60 seconds when both clocks claim NTP synchronisation, when this member is NTP-synchronised and its predecessor is not, and beyond 10 minutes of steps in one boot. Wren cannot forge the predecessor's reading the helper acts on. Then tunnels may stall until NTP corrects the clock, andsentinel show healthreportsha-clock-behind-peer. Run NTP on both members (HA handbook). -
Kernel CVEs without a 6.12.y fix. 1.0.0 ships Linux 6.12.119. Of the 194 High/Critical kernel matches the image scan reports, the kernel CNA's per-branch records show 109 already fixed on 6.12.y and 3 not present in 6.12; 63 affect 6.12 and have no 6.12.y fix yet, and 19 have no kernel.org CNA record. These 82 are listed one by one in the release gate's kernel baseline (
scripts/cve-waivers.json), not accepted as a count. 48 of the 63 are fixed in the 6.18 LTS line (6.18.65), which 1.0.1 ships.
Verification
Before tagging, every VM and build check ran under KVM. The HA checks then ran again, one at a time, after the last HA changes.
-
Of the 206 checks in the full run, 202 passed on every run. The other failures were two test-fixture defects, fixed before release, and the HA takeover timing that this release's HA changes address.
-
The final HA run: 34 of 35 runs passed. The one failure was 2 ms over a test bound that has since been derived term by term.
-
HA takeover, measured at the client from the outage start to the new owner's first frame:
fault measured agent crash 0.43–0.47 s Wren crash 0.21–0.28 s owner VM paused 0.32–0.42 s -
The eBPF data plane loads on kernels 6.6, 6.12, 6.18 and 7.0. Its largest program needs 505,079 verifier instructions (on 6.18), of a 700,000 budget.
The full record is in the changelog's 1.0.0 entry ("Release verification"). The test catalogue describes each check.
Start a Sentinel VM
Choose a development VM for the CLI, or an installed appliance for the real UEFI boot, persistence and A/B update path. Run the build steps on an x86-64 Linux workstation with Nix flakes and writable /dev/kvm.
Try the CLI in a development VM
git clone https://github.com/Velstra/sentinel.git
cd sentinel
nix run .#vm
At the appliance console, run sentinel show version and sentinel show interfaces. Use the next procedure when evaluating boot, disk installation, or A/B updates.
Build and boot
Run these commands at the root of a fresh checkout with QEMU installed. Check that neither the VM disk nor the firmware variables file already exists.
nix build .#sentinel-iso --out-link result-iso
firmware=$(nix build .#qemu-firmware --no-link --print-out-paths)
qemu-img create -f qcow2 sentinel.qcow2 32G
cp "$firmware/FV/OVMF_VARS.fd" sentinel-vars.fd
chmod u+w sentinel-vars.fd
qemu-system-x86_64 -enable-kvm -machine q35 -cpu host -smp 2 -m 4096 \
-drive if=pflash,format=raw,readonly=on,file="$firmware/FV/OVMF_CODE.fd" \
-drive if=pflash,format=raw,file=sentinel-vars.fd \
-drive file=sentinel.qcow2,if=virtio,format=qcow2 \
-cdrom result-iso/iso/velstra-sentinel-installer.iso -boot order=d \
-netdev user,id=wan -device virtio-net-pci,netdev=wan,mac=52:54:00:10:00:01 \
-netdev user,id=lan,net=192.168.50.0/24,host=192.168.50.2,hostfwd=tcp:127.0.0.1:8443-192.168.50.1:8443 \
-device virtio-net-pci,netdev=lan,mac=52:54:00:10:00:02
In the installer, choose the new empty virtual disk, create an administrator, set the first NIC to DHCP and the second to 192.168.50.1/24. Check the device before confirming erasure. Eject the ISO, remove the -cdrom option and boot the same VM with -boot order=c. For Proxmox, use q35/OVMF, two VirtIO NICs, a 32 GiB disk and 4 GiB RAM.
flowchart LR
user[(QEMU user net)] --- wan[First NIC: WAN, DHCP<br/>52:54:00:10:00:01]
host([Workstation<br/>127.0.0.1:8443]) -->|hostfwd| lan[Second NIC: LAN<br/>192.168.50.1/24, :8443<br/>52:54:00:10:00:02]
subgraph vm[Sentinel VM]
wan
lan
end
Configure WAN, LAN and management
On the appliance, compare the NIC addresses with the MACs in the QEMU command. Transfer the quickstart command file to the appliance; adapt eth0 and eth1 to the names you observed. Apply it from the local console to preserve the installer-created accounts.
sentinel configure < quickstart.cli
sentinel config check /var/lib/sentinel/appliance.toml
sentinel show interfaces
sentinel show nat
Open https://localhost:8443/ through QEMU forwarding or https://192.168.50.1:8443/ on a directly attached LAN. Verify the certificate identity against journalctl -u sentinel-api.service and use the administrator you created. Record a working baseline before trying a remote configuration change.
Binding the console to the LAN address selects its destination IP, not allowed ingress interfaces. Verify management isolation from every other segment. HA is experimental; follow the HA safety guide with independent recovery access before forming a pair.
Install Sentinel to disk
Boot the installer ISO in UEFI mode. Installation replaces the selected disks. Use the local console to inspect device names, capacity and model before confirming.
Interactive (the ISO default)
Select the intended disks, choose the single-disk or RAID layout, review the on-screen plan and confirm. Create a local administrator and configure the WAN and LAN as prompted. Detach the ISO before rebooting. For a repeatable evaluation, use the VM quickstart.
Preview a scripted install
lsblk -d -o NAME,SIZE,MODEL
sentinel install /dev/vdb
This example previews a single disk. Replace /dev/vdb with the disk you have identified. Only add --commit after reviewing the plan. For a mirror, select two independent disks and use --raid mirror; --encrypt is described below:
sentinel install /dev/vdb /dev/vdc --raid mirror --encrypt # preview the plan
sentinel install /dev/vdb /dev/vdc --raid mirror --encrypt --commit # erase and write
Disk encryption (LUKS2)
Add --encrypt when installing to encrypt the writable data filesystem. A passphrase is required on subsequent boots; plan how you will unlock the appliance after an unattended restart. On a RAID layout the encrypted filesystem sits above the data array. Encryption and system-store integrity serve different purposes.
Verify the installed image
sentinel show version
lsblk -f
findmnt /var/lib/sentinel
Check that the disk booted with its intended slot and that the writable data filesystem is mounted. Retain an independent console while establishing first management access.
Identity and recovery checks
Match permanent NIC MACs to cable roles and set per-member hw-id bindings before trusting interface names; see physical identity. Names alone are not stable identities, and another HA member must not inherit the primary's MAC bindings.
A raw image import does not provision an administrator through cloud-init or config-drive. Use the interactive installer or a controlled offline seed of the data partition; preserve recovery access.
Installer layout checks do not prove the installed disk boots. Test actual post-install boot, encrypted-storage unlock where selected, persistence and management access on the exact image.
Apply a change remotely
Complete the first configuration from a local console. For remote edits, start with a saved, known-good configuration and keep a second management session available.
Preview and apply for two minutes
sentinel configure
In the configuration prompt:
set system hostname branch-a
compare
commit-confirm 2
Inspect the diff before applying. If the change prevents a new SSH or HTTPS session, let the timer expire. The CLI returns to the saved configuration.
flowchart LR
set[set ...] --> compare --> cc[commit-confirm 2]
cc --> test{New session<br/>works?}
test -->|yes| keep[confirm, then save]
test -->|no: timer expires| back[Saved configuration<br/>restored]
Confirm and persist
Reconnect over the path you intend to keep. If it works, enter the following in the configuration session before expiry:
confirm
save
exit
For a normal CLI commit-confirm transaction, confirmation cancels the timer and saving persists the configuration. A plain commit alone is temporary.
Validate a file before use
sentinel config check /var/lib/sentinel/appliance.toml
For a separate candidate file, substitute its path. Validation checks the structure; verify reachability and service behavior on the running appliance.
Use the web console
Review the proposed configuration diff, apply it and reconnect. Choose Keep change before the displayed deadline. The web transaction has its own confirmation window and worker. Avoid issuing a second change while the first is pending.
Recover access
Keep a local or serial console, or an independent unzoned management link. Zoned data links wait for the dataplane to attach. Use interface recovery if an expected port stays down. Use CLI history for inspecting a saved revision.
Find the configuration syntax
Interfaces · Firewall and NAT · Routing · VPN · Services · Worked examples.
Review and stage an appliance update
sudo sentinel system status
sudo sentinel system update check --wait
sudo sentinel system status
Use an installed A/B appliance. Record the current slot and keep console access. Then follow the route for your update source: a signed channel offer or a locally obtained image.
flowchart LR
check[Check signed channel] --> review[Review offer] --> stage[Stage inactive slot]
local[Local image + signed proof] --> stage
stage --> reboot[Reboot] --> gate{Boot healthy?}
gate -->|yes| blessed[Slot blessed]
gate -->|no, tries used up| prev[Previous blessed slot]
Read the trust and recovery reference before first use or migration. It documents signed metadata expiry, scope and sequence checks, bootloader requirements, offline proof formats and bounded downloads.
Online checks persist rollback protection in /var/lib/sentinel/update-trust. Missing/corrupt state, clock rollback or unauthorized key changes require investigated recovery; do not delete the ledger. Signing-key rotation is not implemented by that ledger. A signed offline image is not proof of online freshness.
Signed channel: local CLI or Web UI
Run the three commands above, then review the offered version, image digest and signing identity. To stage the offer you reviewed, substitute its actual ID, then the job ID that stage returns:
sudo sentinel system update stage --offer <exact-offer-id>
sudo sentinel system update job <job-id> --wait
In System → System updates, run Check signed channel, inspect the offer, then choose Download & stage update. A reconnect or expired wait does not cancel a submitted job; inspect system status before retrying. A change to trust, configuration or boot identity requires a fresh offer.
Stage writes only the inactive slot and does not certify a successful boot. Native Enterprise's unreviewed update install path is refused; use the exact reviewed offer. Off-box/no-apply consoles cannot authorize OTA jobs.
Community local-image updates
sentinel show version
sudo sentinel update /path/to/velstra-sentinel.raw --commit
Obtain the raw image and its matching signed proof, validate the expected release identity, and configure the trusted public key before staging. Preserve the other bootable slot. The example expects a matching .sha256 and .sig beside the image as documented by the release. A disk or USB source requires a separately supplied release proof. Review the identified target and version before authorizing a write.
The Community writer is refused on native Enterprise images, including with --allow-unsigned. Signed and unsigned local writes keep bootloader and active-GUID safeguards. A digest proof signs a small file containing the image's 64 hex digest, not a filename; an invalid selected proof never falls back to another format. Unplug a USB donor before reboot because it shares the staged slot's GUIDs.
Named channels and subscriptions
A configured channel specifies a base URL and trusted public key; licensed channels may also require a subscription credential. Inspect the selected channel with sentinel show subscription. Do not share a full configuration dump, which can include secrets. An expired entitlement prevents new downloads from the licensed channel; the installed appliance keeps forwarding.
Reboot to activate
sentinel show version
bootctl status
Staging prepares the inactive slot and its next boot entry; it does not reboot. Check boot selection, management reachability and peer readiness first, and update one HA member at a time. After the reboot, run the commands above and test traffic on your normal management and data paths.
Fallback needs an intact, previously blessed slot. It cannot repair a bad persisted configuration shared by both slots. A factory installation with a configured missing NIC exhausts its counted trials and remains unblessed for console recovery; it is not a normal carrier or DHCP delay. Inspect sudo sentinel config check --live /var/lib/sentinel/appliance.toml and follow the recovery constraints.
Verify fallback separately
nix build .#checks.x86_64-linux.bootfallback -L
On a KVM build host, this runs the failed-boot fixture. Boot slots and fallback explains the difference between a boot failure and an application regression.
Update trust and recovery reference
The rules behind review and stage an update; the design is in A/B update slots. A new image is written to the inactive store slot and the bootloader switches to it. Automatic fallback requires an intact, previously blessed slot; an unprovisioned or broken first installation has no such guarantee.
Signed channel: local CLI or Web UI
On the live A/B appliance, as an administrator:
sudo sentinel system status
sudo sentinel system update check --wait
sudo sentinel system status
# Review the offered version, image digest and signing identity first.
sudo sentinel system update stage --offer <exact-offer-id>
sudo sentinel system update job <job-id> --wait
sequenceDiagram
participant Op as Operator
participant Wk as Update worker
participant Ch as Channel
Op->>Wk: update check
Wk->>Ch: fetch release.json (bounded)
Note over Wk: pinned key, scope, expiry,<br/>sequence vs ledger
Wk-->>Op: verified offer (version, digest, signer)
Op->>Wk: stage --offer <id>
Note over Wk: recheck the exact offer
Wk->>Ch: download image (bounded)
Note over Wk: hash whole image, write inactive slot,<br/>select counted next boot
Wk-->>Op: job done, no reboot
Output is JSON. Each submission returns a durable job that disconnects and API
restarts do not stop; --wait observes it for at most five minutes without
owning or cancelling it. If an outcome is unknown, inspect system status by
its request correlation instead of resubmitting. In the Web UI the same steps
are System → System updates → Check signed channel → Download &
stage update, with one shared job history.
Staging does not reboot or claim a successful boot: check boot selection and
cluster readiness, then reboot one member at a time. There is no
trust/downgrade override. Native Enterprise update check uses this worker;
the former unreviewed update install path is refused.
| Stage is refused | Because |
|---|---|
| after a change to configuration, trust or boot identity since the check | it needs a fresh check and review |
| with pending config changes, a remote member selected, a read-only account or a stale observation | none of these can authorize Stage |
| from an off-box/no-apply console | it cannot run OTA jobs |
while the running image is an unblessed counted trial or not the next default (any slot write: CLI or UI, signed or --allow-unsigned) | overwriting the other slot would remove the only known-good fallback |
Expiry and replay protection
| Check | Rule |
|---|---|
| Signed fields | Online offers must carry signed channel, architecture, sequence and validity timestamps. |
| Expiry | Metadata expires within 14 days; expired or wrongly scoped offers are refused. |
| Clock skew | Issue times beyond the five-minute allowance are refused. Synchronize the clock before checking. |
| Ledger | A check persists its highest accepted sequence and clock observation in /var/lib/sentinel/update-trust. |
| Fail closed | Lower sequences, changed bytes at the same sequence, unauthorized signing-key changes and substantial clock rollback. |
| Stage | Rechecks the exact offer before writing the inactive slot. |
| Key and sequence scope | Per signing key, not per channel name: a new channel label must be signed by an already pinned key, at a sequence no lower than that key reached under any label. |
Warning: Do not delete
/var/lib/sentinel/update-trustto clear an error: that discards rollback protection. Repair the clock or obtain fresh, correctly signed metadata. A missing or corrupt ledger that was once published requires investigated recovery, not an automatic reset.
Interrupted first checks, key changes and old readers
A first check interrupted before its ledger was published (only the lock and staged files exist) is completed by the next check. Signing-key rotation is not yet implemented by this ledger, so selecting a channel signed by a different key needs the same investigated recovery as a key rotation.
Older appliance versions without the slot-write validation must be upgraded first; new metadata alone cannot protect an old reader. Offline media and automatic boot fallback follow their own policies below.
Community offline/local-image updates
# from a new raw image (built with `nix build .#sentinel-image`) plus its
# signed digest velstra-sentinel.raw.sha256(.sig) beside it
sudo sentinel update /path/to/velstra-sentinel.raw --commit
# from a USB stick the image was dd'd onto, with the release's proof from
# another medium (a signed manifest, or the signed digest)
sudo sentinel update /dev/sdX --commit --signature /mnt/release/manifest.json.sig
Community RAW-image writer only: native Enterprise images refuse it, also with
--allow-unsigned. An offline proof authenticates operator-selected bytes, not
their online freshness or subscription entitlement. Without --commit the plan
is printed and nothing is written.
| Step | A signed Community local update |
|---|---|
| 1 | verifies the image's signature (see below) |
| 2 | refuses a release older than the running one unless --allow-downgrade (when the proof states a version) |
| 3 | detects the active slot (via /dev/mapper/usr) |
| 4 | reads the image once and hashes it in full against the signed digest; nothing is written unless it matches |
| 5 | writes the new store + verity to the inactive slot from that same open file, re-hashed on the way, so an image that changes underneath (a rewritten file, a swapped stick) is refused before the slot is activated |
| 6 | gives that slot the source image's verity partition types and GUIDs |
| 7 | installs the new UKI as sentinel-<inactive>+3.efi with 3 boot tries |
| 8 | makes loader.conf prefer the new slot with preferred sentinel-<inactive>*, keeping default sentinel-* so an exhausted candidate can fall back |
Before any inactive-slot write, signed and unsigned commits require the running UEFI systemd-boot version 260 or newer and no nonempty firmware default, preferred or one-shot entry override. An image carrying the active slot's verity/store GUIDs is refused before any write, unsigned sources included. Unplug a USB donor before reboot: it now shares the candidate's GUIDs and could be mistaken for the installed slot.
Bootloader and identity details
Older/non-systemd loaders and malformed or unreadable EFI state are refused.
Sentinel does not silently clear firmware variables: inspect the override named
in the error and review the suggested bootctl clearing command before
retrying. Bootloader maintenance is a separate operation, not a package-manager
update on the node. A hard per-slot default is unsafe: systemd-boot 260
honors it even when its boot counter reaches zero. Do not re-seal the booted
medium.
Local images are signature-checked by default
sha256sum velstra-sentinel.raw | cut -d ' ' -f 1 > velstra-sentinel.raw.sha256
openssl pkeyutl -sign -inkey release-priv.pem -rawin \
-in velstra-sentinel.raw.sha256 -out velstra-sentinel.raw.sha256.sig
sentinel update <image> verifies an Ed25519 proof before writing:
<image>.sha256 with its detached signature when the digest file exists,
otherwise <image>.sig, or the file named by --signature <file>. Missing
keys, missing signatures and invalid proofs fail closed; a bad digest proof
never falls back to a raw signature.
| Key source, in order | |
|---|---|
| 1 | --pubkey <pem|file:path> on the command line |
| 2 | the saved [update] channel's public-key |
| 3 | a release key baked into the image at /etc/sentinel/release.pem |
Publishers should sign a small digest for multi-GiB images, as above (direct Ed25519 signing buffers the entire input), on their protected machine, not on customer nodes. The digest file holds only 64 hex digits and an optional newline, not a filename. The updater verifies the signed digest, then hashes the entire image. Legacy direct image signatures work for regular files up to 64 MiB (a private copy is verified and installed); larger images need the signed digest.
USB sticks and other block devices
A stick is larger than its image and nothing can sit "beside" /dev/sdX, so
prove a block device with --signature naming either:
…/manifest.json.sig: the channel's signed release manifest (copy the channel directory to a second medium). It names the image's SHA-256 and the release version, so the downgrade check applies.…/velstra-sentinel.raw.sha256.sig: the signed digest (above).
The device is read up to the end of the image its own partition table describes (the backup GPT header); those bytes must hash to the signed value.
Downgrades
| Proof | Downgrade check |
|---|---|
| Online offer, offline signed manifest | Checked against the running OS image release, not just the Sentinel package version. Older releases and unusable image version identities are refused. |
| Signed digest, raw signature | Contains no release version, so cannot rule out a downgrade: refused unless --allow-downgrade accepts it explicitly. |
Use a signed manifest for a normal offline update. Only the legacy Community
writer accepts --allow-downgrade, as an explicit operator exception. Equal
versions may pass the version check, but identical active partition GUIDs still
cannot be staged. Offline proofs do not consult the online ledger; online
offers, including file:// channel directories, must satisfy
expiry and replay protection.
--allow-unsigned skips local signature verification, on Community only. It
does not bypass bootloader, identity or identical-image safeguards, does not
permit re-sealing the active image, and is not an OTA trust override.
Manifest product field
An optional manifest product must equal velstra-sentinel when present.
Legacy offline manifests may omit it; that compatibility is not proof of a
current online offer.
Configure a signed channel
configure
set update url https://updates.velstra.example/sentinel
set update public-key file:/etc/sentinel/release.pem
commit
save
| Field (both required) | Meaning |
|---|---|
url | The channel base: an https:// or local file:// directory holding release.json (or the compatibility manifest/signature pair) and its images. Local channel directories still require signed online freshness. |
public-key | The pinned Ed25519 release-signing key, PEM. file:<path> reads it from disk (so the key can live in the immutable image, not the config); an inline PEM also works. |
The whole [update] section is local-only: a fleet controller cannot change it
(see the fleet documentation). An https:// channel is checked against the
system trust store; proxies are not supported. No channel path accepts an
unsigned release or bypasses online freshness.
Fetch environment and the legacy adapter
The fetch is the pinned curl with --disable and an empty environment:
HTTPS_PROXY/ALL_PROXY, SSLKEYLOGFILE, CURL_CA_BUNDLE/SSL_CERT_FILE
and ~/.curlrc are ignored.
Native Enterprise sentinel update check is an alias for the reviewed worker;
sentinel update install is refused. Community keeps a legacy
update check/install adapter, but that is not the reviewed offer/job
workflow; do not use it as an unattended replacement.
Named channels and subscriptions
configure
set update channel community url https://updates.velstra.example/community
set update channel community public-key file:/etc/sentinel/community.pem
set update channel enterprise url https://updates.velstra.example/enterprise
set update channel enterprise public-key file:/etc/sentinel/enterprise.pem
set update channel enterprise subscription-key <key>
set update channel enterprise # ← selects the active channel
commit
save
Each named channel pins its own url, public-key and optional subscription
credential. set update channel <name> selects an existing channel; the single-channel
configuration above is the unnamed default channel. A channel name is neither
a separate trust identity (reusing a signing key shares that trust) nor proof
of certification; review the release's verification evidence.
subscription-key is a bearer secret. The read API redacts it and
show subscription masks all but its last four characters, but saved
configuration and local show configuration hold the full credential: protect
them.
What an expired subscription does — and does not — do
It stops fetching new images from that channel. It does not disable routing, filtering, saved configuration or the console. Authentication failures are reported, not treated as unsigned offers. Subscription expiry is not signed metadata expiry: an entitled customer still needs a fresh, scoped offer, and a metadata refusal never disables the running data plane either.
show subscription
This legacy view reads saved configuration and the legacy adapter's last-check
record, without a network request; sentinel system status shows the durable
worker's offers and jobs. expiry: not reported means this view does not
provide subscription entitlement expiry. It says nothing about the mandatory
expiry in signed metadata; do not infer a license expiry date from a release's
validity window.
The rollback guarantee
flowchart TD
boot([Reboot into candidate, +3 tries]) --> gate{Health gate passes and<br/>no failed units?}
gate -->|yes| bless[Blessed]
gate -->|no| tries{Tries left?}
tries -->|yes| boot
tries -->|no, blessed previous slot| prev[Boot previous slot]
tries -->|no good alternative| stop[Unblessed, no automatic reboot:<br/>console recovery]
The health gate checks saved configuration against live hardware, reconciled addresses, configured services, dataplane readiness and XDP attachment; service activation alone is not success. Fallback is not a guarantee against every firmware, storage or kernel hang, and both slots share the persisted configuration: falling back does not repair a bad configuration or remove an unavailable NIC.
On a Community factory installation, a configured missing NIC takes the "no good alternative" path; it is not treated as ordinary carrier loss or a temporarily absent DHCP server. Inspect, repair the saved interface configuration from the recovery console, then reboot explicitly and verify normal health and blessing:
sudo sentinel config check --live /var/lib/sentinel/appliance.toml
For a deliberate recovery boot, select the verified good entry once in the boot
menu. Do not write a hard per-slot default: it can override exhausted
counters. Follow the updater's preferred/wildcard policy and review any
firmware override before staging again.
Reboot to activate
Unlike commit (live, never reboots), an OS image update takes effect on the
next reboot into the new slot; the running slot serves until then. Schedule
the reboot when convenient.
Verifying
nix build .#checks.x86_64-linux.update -L
nix build .#checks.x86_64-linux.bootfallback -L
nix build .#checks.x86_64-linux.missing-nic-boot -L
| Check | Exercises |
|---|---|
update | A real donor-image A→B boot and normal product blessing. It does not replace the negative/fallback checks. |
bootfallback (fixture) | Three failed dataplane boots and fallback to a previously blessed image. |
missing-nic-boot (fixture) | Exhausted factory trials and product CLI repair. Driver backdoor commands are not proof of an authenticated physical console login. |
These are source-level VM gates: their existence, or a pass on another candidate, is not certification of the final signed release and its exact hashes.
Bounded metadata and atomic channel promotion
The reader prefers release.json: schema = 1, manifest (base64 of the
exact signed bytes) and signature (base64 of the 64-byte Ed25519 signature).
The pinned key authenticates the exact manifest bytes before any release field
is trusted; the envelope is not a new trust root. Only an absent endpoint (HTTP
404, or a missing local file) allows fallback to manifest.json and
manifest.json.sig; malformed, oversized, unauthorized, timed-out or
incorrectly signed envelopes never fall back.
| Limit | Value |
|---|---|
| Envelope / decoded manifest | at most 128 KiB / 64 KiB |
| Connection | 10 seconds |
| Metadata | 60 s overall, 15 s without progress |
| Image download | 6 h overall, 60 s without progress, 64 GiB transfer ceiling (native Enterprise resources keep their stricter individual limits) |
| Staging reserve | the greater of 512 MiB or 5% of the state filesystem, plus metadata headroom |
| Concurrent image updates | one; a second writer gets another update is in progress |
Limits are enforced during transfer, chunked responses included, with appliance-pinned curl 8.4 or newer. Incomplete downloads are removed and failures leave the active slot unchanged.
Publishing a channel migration
Publishers must keep the old root manifest/signature pair frozen while upgrading legacy readers, upload immutable versioned resources first, and promote only the single envelope object last. Both public and native Enterprise readers must be upgraded before production channel migration. On Linux the curl child is killed automatically if its update owner exits.
Staging space and locking
Channel RAW images are staged sparsely in an anonymous 0600 file on the mounted
ext4 state filesystem (/var/lib/sentinel), not in RAM-backed /tmp and not in
an operator-selected TMPDIR. Every zero byte still counts toward the signed
image digest and exact logical length; only nonzero blocks allocate payload
space. The open descriptor survives whole-image verification and partition
copying and is reclaimed automatically when the updater exits. There is no
persistent image cache to clear after a crash.
The updater refuses an extent that exceeds its staging budget. Concurrent unrelated filesystem writers can still consume space; such allocation or sync failures safely refuse the update. A genuine signed dense image can need more staging space than a sparse release. Missing/unmounted/volatile/read-only state and insufficient capacity are explicit errors; the updater never deletes configuration, archives, logs or a fallback slot to make room. The recommended 32 GiB appliance disk has room for state and releases; a smaller disk that boots is no guarantee that every future release will fit. The bounded ESP copy is verified before any inactive-slot payload is overwritten.
The update lock covers signed local and deliberately unsigned local writes too. It does not block ordinary configuration commits or metadata checks while a download is in progress.
The persistent subscription identity is published only after its private contents are complete and synced. Concurrent first use converges on one identity; corrupt or insecure existing files are refused rather than silently replaced with a new subscription seat.
No deployed node is changed by a source update: fresh image and OTA/rollback qualification are required before rollout.
Choose an HA election mode
HA is experimental. Read the safety and migration guide and qualify failover on the exact image before relying on the pair.
Two Sentinel appliances can form an active/standby pair on their own. Add an independent witness when a complete break between the peers must still leave at most one member authorized to forward.
| Mode | Who grants forwarding authority? | If the two members lose every path to each other |
|---|---|---|
| Two-node | The peers elect the active member using authenticated heartbeats. | Each can conclude that the other is down. Both can become active. Independent heartbeat paths reduce this risk. |
| Witness | A third system grants a time-limited lease to one member. | A member needs a valid lease to keep forwarding. The kernel blocks its guarded data interfaces after expiry. If neither member can reach the witness, both can end up fenced. |
flowchart LR
C([Clients]) --> V((VIP)) --> P[Primary<br/>owner]
P <-->|control path, sync| S[Secondary<br/>192.0.2.12:8080]
P <-.->|lease| W[Witness<br/>192.0.2.13:5440]
S <-.->|ready standby| W
Two-node mode is the same picture without the witness.
Prepare the control path
Use two matching appliances with distinct control addresses, matching logical data-interface names, and working console access. Keep the control path out of the fenced data interfaces and their underlying links. Configure the secondary’s HTTPS management endpoint and enrollment credential.
The examples use secondary 192.0.2.12:8080 and witness 192.0.2.13:5440. Replace them with your own endpoints. Run one pairing command on the primary. It prompts for the secondary’s credential.
Pair two nodes without a witness
Leave the witness address unset on the prepared primary. Select two-node mode explicitly:
sentinel ha pair 192.0.2.12:8080 --mode two-node
sentinel show ha
Check the mode and role on both members, and make sure the backup is ready. Under normal connectivity, expect one master and one backup. If every heartbeat path fails, neither peer can distinguish a failed partner from a network partition.
Enroll the witness and pair the members
Witness is the default mode for a newly configured pair. For this mode, first run sentinel ha witness-key on a member and enter the enrollment credential. Configure the independent witness with the derived cluster ID and key, allow both members’ control addresses, and start the witness. Witness configuration and timing.
sentinel ha pair 192.0.2.12:8080 --mode witness --witness 192.0.2.13:5440
sentinel show ha
Check the owner and remaining lease on the master and readiness on the backup. The witness grants authority. The member’s kernel enforces the deadline even if its control process is paused.
Observe the owner, then verify a failover
On both members, run sentinel show ha for authority and readiness and sentinel show vrrp for virtual-address state. In an isolated evaluation network, follow a continuous test flow across failover. Session continuity depends on the workload and replica state.
Run the multi-VM acceptance test
On a KVM-enabled x86-64 build host, choose the fixture for your deployment:
nix build .#checks.x86_64-linux.ha-two-node -L
nix build .#checks.x86_64-linux.ha-witness-failover -L
The first fixture runs a pair without a witness. The second pauses the former active process while its kernel remains alive and checks that the old path stops forwarding after its authority expires.
High availability and config sync
Warning: HA is experimental. Use a dedicated lab with console access to both members. The existing pairing, state-sync and flow-failover tests are not complete HA qualification or a rolling-upgrade guarantee.
# on the primary, once both members are prepared (below)
sentinel ha pair 10.3.0.2:8080 --witness 10.3.0.3:5440
sentinel show ha
Choose the failure model
flowchart TD
new([New pair]) --> q{Must a total partition<br/>leave one forwarder at most?}
q -->|yes| witness[witness mode<br/>independent witness required]
q -->|no: forwarding through a<br/>witness outage matters more| two[two-node mode]
old([Existing VRRP deployment]) --> vrrp[legacy VRRP + sync<br/>no fencing]
| Mode | Authority | Important limitation |
|---|---|---|
witness | An independent witness grants short forwarding leases to one member. | The witness is a single point of failure for forwarding: losing it stops forwarding on both members within one lease, even when both appliances are healthy (see Witness loss). |
two-node | Two appliances exchange authenticated heartbeats without a witness. It has no witness-mode fencing. | A total partition can promote both members. Independent heartbeat paths reduce, but do not remove, that risk. |
| Legacy VRRP and sync | VRRP election and separately configured synchronization. | Not equivalent to fenced pairing; do not infer split-brain protection from a shared VIP. |
Do not mix these models. No mode is production-certified while release acceptance and the open HA failure cases remain unresolved.
Prepare two members
sentinel ha secret generate # 32 random bytes as 64 hex digits
On the secondary (10.3.0.1 on the primary):
sentinel configure
set services web listen-address 10.3.0.2
set services ntp upstream pool.ntp.org
set system config-sync secret <the generated value>
commit
save
| Item | Requirement |
|---|---|
| Image | The same reviewed image on both. Save each configuration and verify console recovery before changing HA. |
| Control path | Distinct, static control addresses (e.g. 10.3.0.1/24, 10.3.0.2/24). The route to the peer endpoint must use an explicitly declared control interface, not a shared/fenced data link. |
| Data interfaces | Matching logical names; member-specific hardware bindings. |
| Management | A separate unzoned management NIC on an isolated network, with each node's own management IP and SSH bind address. Address binding alone is not cross-interface access isolation. |
| Policy | Firewall, NAT, routing and VRRP VIP policy on the primary. The peer must already declare its own local addresses; a new static link needs explicit peer identity facts, not an address copied from the primary. |
| Web listener | On each member, services web listen-address bound to its own control address, TLS kept on. An unset address stays 127.0.0.1, even when web and sync are both enabled. A custom services web port must appear in the peer endpoint. |
| Secret | system config-sync secret from sentinel ha secret generate; see The HA secret. It starts the HTTPS machine API even with the web console disabled, but never widens its listener. |
| NTP | On both members (services ntp upstream). Certificate checks, one-time passwords, log timestamps and update freshness read the wall clock. |
Save both configurations and check the real endpoints before pairing. Do not
activate an incomplete election by setting system.ha.enabled = true by hand;
pairing validates and records the member profiles.
How NTP and takeovers keep the clock right
With HA WireGuard a member also aligns its clock with its predecessor's at a
takeover (see VM pause and the clock), but only
within bounds; NTP keeps it right. The appliance's chrony steps any offset over
one second as soon as it measures it (makestep 1.0 -1), so a member resumed
from a VM pause is corrected at its next poll.
Without NTP on either member, repeated pauses and takeovers can carry both clocks ahead of real time by up to about 5 s per cycle; NTP removes that drift. Between two NTP-synchronised members the step is capped at 60 seconds: a standby paused longer than that while its kernel still reports synchronised is not stepped, and its tunnels follow once NTP corrects it. That is the accepted price of not following a faulty "synchronised" peer.
Pair without a witness
sentinel ha pair 10.3.0.2:8080 --mode two-node
Run on the primary; enter the secondary's secret at the hidden prompt. For
automation use --secret-stdin from a protected source, never --secret or a
token in argv. An explicit cluster identifier must agree between the members.
A partial attempt leaves /var/lib/sentinel/ha-pair.json; retry with the same
endpoint, mode and credential to resume. Do not delete a pending plan to bypass
a reported conflict.
What pairing checks
Pairing authenticates the peer with a fresh TLS-bound challenge, captures local identities and applies both documents. It refuses a default or explicit loopback listener before it writes a local plan or enrolls a peer. An explicit wildcard is permitted, not required; prefer the intended control address plus an explicit ingress ACL.
Pair with a witness
sentinel ha witness-key # same secret, hidden prompt; add --cluster <id> if set
sentinel ha pair 10.3.0.2:8080 --witness 10.3.0.3:5440
Put the printed cluster and key into the witness's system.ha-witness
configuration, set its listen endpoint and restrict member to the two control
IPs. The witness never needs the machine enrollment token.
A reachable TCP port does not prove the witness will authorize the right cluster/key/member pair. Do not upgrade the witness and the members independently unless that exact mixed-version combination has a passing test.
Verify policy, identity and traffic
On each member:
sentinel show ha
sentinel show vrrp
sentinel show interfaces
sentinel show ip route
systemctl --failed --no-pager
journalctl -u sentinel-configsync.service -u wren.service -u velstra.service
A healthy witness pair (values vary):
HA Master
configured mode witness
node 1 cluster lab-a term 7 owner 1
lease remaining 212 ms
HA Backup
configured mode witness
node 2 cluster lab-a term 7 owner 1
last complete state update 40 ms ago
Also check the expected VIP, local addresses and SSH on both management NICs, and hold one real TCP connection through the VIP open across a controlled lab failover. A role label or matching saved files do not prove forwarding or established-flow continuity.
| Witness timing | Default |
|---|---|
| Lease | 250 ms |
| Exchange budget | 80 ms |
| Constraint | the lease must cover 2 × io-timeout-ms + 45 ms |
Timing is a safety parameter, not a latency claim: measure under load and test loss/recovery before changing it. A longer lease also lets an old owner keep authority longer. Never tune away a failure by making the guard less conservative.
The HA secret
system config-sync secret is the peer credential: the enrollment
credential ha pair and ha witness-key prompt for, and the authority to
change the traffic policy of both members. Generate it with
sentinel ha secret generate and set it on both members. Keep it out of shell
arguments, public logs and screenshots.
| Secret rule | Value |
|---|---|
| Generated form | 32 random bytes as 64 hex digits |
| Accepted length | 32–1024 bytes, no control characters |
| Refused at commit | fewer than 10 distinct characters, a repeated short pattern, or words/sequences (estimated below 128 bits); e.g. ha-test-credential-… |
| Why | anybody who reaches the management port can test guesses against the enrollment proof offline |
| Rotation | set a new generated value on both; the outbox delivers it with the old credential |
What a member trusts its peer with
| A peer holding the secret can | It cannot |
|---|---|
| read what a read-only account reads (the stack view, enrollment) | replace a member's whole configuration through the ordinary API |
push the shared configuration (PUT /api/v1/config-sync): firewall, NAT, routing, VPN, services | post configure lines, stage updates, or confirm or revert a commit-confirm window |
complete a pairing (POST /api/v1/ha/pair), which sets the HA identity | post a different pairing to an already paired member (that needs the member's machine token, or unpairing first; repeating the applied pairing works) |
Whoever obtains the secret, or controls a member, controls what both members forward: keep it to the two members, rotate it if either is suspect, and treat a compromised member as a compromised pair. Accounts (with SSH keys, password hashes and TOTP secrets), groups, AAA servers, update channels and keys, SSH server and serial console are never changed by a push or a pairing: configure them on each member.
Enrollment contents, rate limits and logging
Enrollment hands the peer the receiver's configuration without its accounts, AAA servers and update channels; the shared policy secrets in it (VPN keys, PSKs) belong to the pair anyway.
Each source address may request ten enrollment proofs per ten minutes (a flood
of fresh addresses can delay pairing; retry). After thirty invalid bearers a
source's further invalid ones get 429 for five minutes. Every non-read use of
the peer credential or machine token is logged with its source address
(journalctl -u sentinel-api).
Upgrading a pair with a weak secret
A member upgraded with a weak secret still boots, keeps its pairing and serves its API, but refuses every configuration change until the secret is rotated (both members, one commit each).
Warnings and the machine token after the upgrade
It also warns at every apply and hands out no enrollment proof. The new image's
first boot replaces /var/lib/sentinel/api-token if an earlier release wrote
the secret (current or since removed) into it; read the new machine token from
that file. A token you placed there yourself is kept.
Mixed versions during an upgrade
flowchart LR
s[Upgrade the standby] --> f[Fail over to it] --> p[Upgrade the old primary]
p -.->|never| back[Fail back onto a<br/>member not yet upgraded]
- Never fail back onto a member that is not yet upgraded. A masqueraded connection owned by an upgraded (1.0) member does not survive a takeover by a pre-1.0 peer.
- Until both run the same version, do not change accounts, AAA, update, SSH, console, BGP update-source or PPPoE local-address settings on either member, or the next push is held as a conflict. Finish the upgrade promptly.
- An upgrade from 0.4 is not hitless: 1.0's members compute a different readiness digest, so the switch-over is an outage with connection loss.
Why these rules
Pairing and config-sync work between an updated and a not-yet-updated member: both understand the proof, the bearer and a push's base revisions. For the settings listed above, the updated member keeps its own while the older one still sends and adopts them, so their shared revisions diverge and the next push is held as a conflict (resolve it like any conflict). Pushes from the updated member still replace these settings on the older one, as before the upgrade.
The older allocator looks for a masqueraded connection's public port
elsewhere, assigns a new one, and the connection breaks. Between members whose
readiness digests agree (from 1.0 on), the other direction works: connections
the older member owns survive the switch to the upgraded one
(checks.ha-napt-mixed-version).
Members whose images compute the shared policy differently (the compiler numbers zones or encodes rules differently) never agree on the readiness digest. Across such a change the standby stays not ready, no state crosses, and the switch-over is an outage with connection loss, not a warm failover.
SYN-proxied connections in a pair
The member that owns a SYN-proxied connection's state ends its proxy record.
| Deployment | Who ends proxy records |
|---|---|
With a lease (witness or two-node) | Only the lease owner. The standby keeps imported records and applies the owner's removals. |
Without a lease (legacy VRRP with system conntrack-sync) | Each member ends the records it created once its own copy of their state expires; it never ends one imported from its peer. |
Consequence without a lease
The copy stops following the peer after a failover, so a proxied connection
carried across one lives at most tcp-established (24 h by default) after it,
even while active. Records imported from a peer that never returns stay until
the table reclaims its least recently used entries.
Standby readiness
On the standby, sentinel show ha must read plain HA Backup. A reason in
parentheses means the witness would refuse it authority now, so a failure of
the active member would not fail over.
| Reason | Meaning |
|---|---|
policy differs from the owner's; awaiting configuration sync | A commit has not reached this member, or the shared policy differs. If it persists after sync has delivered, compare both configurations; the refusal is logged as a warning once a minute. |
fresh agent has no state snapshot yet | The agent just started. It imports the owner's state within a second. |
no complete state snapshot from the owner / state snapshot is stale | State sync from the owner is not arriving. |
stale state discarded; awaiting a state snapshot | State stayed unusable for 5 s (stale, or imported under a policy it no longer holds) and was dropped; the member votes as an empty member. |
stateDiagram-v2
[*] --> NotReady: agent starts
NotReady --> Backup: owner's state + same policy
Backup --> NotReady: state unusable 5 s, discarded
Backup --> Master: witness grants the lease
Master --> Master: policy commit, new term
Master --> Fenced: agent exits or lease ends
Fenced --> NotReady: agent restarts empty
NotReady is shown as HA Backup (not ready: …).
What the readiness digest covers, and why stale state is discarded
The digest covers the shared policy only. Per-member addresses are deliberately
left out: a rule to firewall is symbolic (each agent expands it to its own
addresses, DHCP leases and held VRRP addresses), and a captive-portal gate
names each member's own address. So two members with the same shared
configuration agree.
Discarding unusable state breaks a deadlock: if the active agent crashed meanwhile, it restarts empty too, and two empty members let the witness open a new epoch. Established connections do not survive that path; new ones do.
Failure behaviour (witness mode)
How long a failover takes
A takeover runs from the first packet a client loses to the new owner's first VIP announcement:
| What failed on the owner | Takeover, by design | Takeover, measured |
|---|---|---|
velstra killed (agent crash, OOM) | at most 0.675 s | 0.43–0.52 s |
wren killed | at most 0.32 s | 0.17–0.27 s |
| the member's VM paused | at most 0.47 s | 0.32–0.41 s |
| its data links lost | at most 0.495 s | not measured (derived) |
sequenceDiagram
participant O as Owner
participant W as Witness
participant S as Standby
participant C as Clients
Note over O: velstra crashes, kernel fence closes at once
O->>W: wren renews until the agent's last report is 100 ms old
Note over W: lease (250 ms) runs out
S->>W: ready standby votes
W->>S: grant, new term
Note over S: agent acknowledges the term
S->>C: gratuitous ARP / neighbour advertisement for the VIPs
An established TCP connection resumes on its next retransmission of the lost packet, about 0.2, 0.6 and 1.4 s after the loss (0.2 s timeout, doubling). So a connection typically resumes 0.8–1.1 s after the fault, and up to about 1.7 s when the takeover ends just after a retransmission. Through HA WireGuard a client may also wait for one handshake retry (about 5 s).
What each failure does
checks.ha-witness-failover exercises these cases.
| Failure | What happens |
|---|---|
Data-plane agent crash on the active member (velstra killed, OOM) | Takes longest (diagram above). The ready standby takes over and established flows continue. The crashed member restarts empty, imports the new owner's state and rejoins. |
Routing daemon crash (wren killed) | The lease lapses and the standby takes over the same way. The owner forwards until its own lease ends, so clients lose nothing before that. |
Data-plane agent stalled or ineligible (velstra stopped or wedged, or reporting itself not ready) | wren renews only while the agent's report is fresh (100 ms) and eligible. The member gives up its VIPs when that lease ends: at most about 0.45 s after the agent stops (the 100 ms freshness bound, the 250 ms lease, then one coordinator poll and one witness exchange before the release is noticed). The data plane does not wait: an exited agent is fenced at once, an ineligible one closes its own kernel deadline, a wedged one stops extending it. One late report does not move the VIPs. |
| VM pause, suspend or live migration | A resumed member catches up from the current owner by itself and is eligible again; the next failure still fails over. See VM pause and the clock. |
| Agent crash while the witness is away | Neither member can use its state; when the witness returns, the pair opens a new epoch on its own (see Standby readiness). Expect a short outage and new connections. |
A takeover does not pause the new owner's data plane, in witness, two-node
and plain VRRP mode, except for a VIP whose prefix length the interface does
not already carry (a /32 VIP, or one outside the interface's subnets): that
still takes the full rewrite, and the data plane pauses for its length.
Why a takeover changes no rule
Every VRRP virtual address is a local destination (rules to firewall) on both
members, held or not, so taking the VIPs changes no rule: the new owner only
records the address for its own sockets and keeps its configuration gate open.
A commit still closes that gate; while closed, every attached link drops
everything, the member's own witness exchanges included.
Failback (preempt = true on the higher-priority member) waits until the
new owner has held ownership for 10 s, so expect the VIPs back about 10 s after
a failover; failover itself does not wait. The hold is fixed in 1.0, not a
setting, and enforced by the witness: it applies once the witness runs 1.0,
even with mixed member versions; members talking to an older witness fail back
without it. Two-node mode has its own election and no such hold.
Why failback waits 10 s
Without the hold, a restarted wren took the pair back 3 to 4 s after the
fault, as soon as its agent held the successor's state. A WireGuard takeover
still waiting for a handshake retry then lost the pair before it forwarded: one
fault, two handovers.
VM pause and the clock
Warning: Drain or demote an active member before migrating or suspending it. A paused VM's clock stops with it, so for up to one lease (250 ms by default) after resuming, its data plane can still consider its old lease valid while the witness has already granted the peer.
With HA WireGuard interfaces, a member that takes over steps its wall clock
forward to its predecessor's, so peers accept its handshakes; tunnels then
follow in about a second (checks.ha-wireguard-failover). If the step is
refused or fails, the takeover still happens, sentinel show health reports
ha-clock-behind-peer, and tunnels may stall for up to the clock offset.
| The step is refused when | Limit |
|---|---|
| the lag exceeds | 10 minutes |
| both clocks claim NTP synchronisation but disagree (one of them is faulty) | by more than 60 seconds |
| this member's clock is NTP-synchronised and its predecessor's is not | always |
| this boot's steps would exceed in total | 10 minutes |
How the clock step works
A paused member's wall clock lags by the pause until NTP corrects it. Both members answer WireGuard peers with one shared identity, and a peer accepts a handshake from it only with a newer timestamp than the last. So the new owner steps its clock once it holds the VIPs, before it reconfigures WireGuard and starts handshakes. The owner replicates its clock over the authenticated state stream to standbys that announce they understand it. The check also covers preemption by a formerly paused member. The step is logged with old and new time and never goes backward.
The ha-clock-behind-peer report clears when NTP synchronises a clock that was
unsynchronised at the takeover, or when a later takeover steps or finds the
clock in step on a fresh reading. A missing or stale peer reading is logged at
the takeover; it is not reported itself and does not clear an earlier report.
Wren does not step the clock: a small socket-activated helper,
wren-ha-clock-step, holding CAP_SYS_TIME and nothing else, and taking no
amount or time from Wren. It reads the predecessor's clock from
/run/velstra/ha-clock, where the agent publishes it, and keeps its lock, step
budget and decisions in /run/velstra-ha-clock-step. Wren's unit cannot see
either directory, so Wren can trigger a decision on the agent's reading but can
neither forge the reading nor touch the budget. Requests are served one at a
time, under a lock, on a freshly read clock.
Witness loss is a single point of failure
Losing the witness stops forwarding on both members within one lease; when it
returns, the previous owner is granted again from its retained state and
forwarding resumes. No setting tunes this away. Run the witness on independent
power and network and monitor it. Prefer two-node mode only if availability
through a witness outage matters more than exclusive ownership through a
partition.
Why both members stop
The active member cannot tell "the witness is down" from "I am cut off from the witness and the peer is not". In the second case the witness grants the peer when the lease runs out, so a member still forwarding on its own would forward alongside its successor. That is the price of split-brain protection.
Forwarding through a witness outage would be safe only with the peer as a second vote: the active member keeps forwarding only on the peer's fresh, authenticated promise not to seek authority itself, and a returning witness waits out every such promise. Sentinel does not implement that protocol.
Configuration writes on either member
Master/Backup is forwarding ownership, not configuration permission: an
authorized commit on either member, Backup included, replicates through a
durable sync outbox. Use one management session at a time for shared policy;
the standby is not a private sandbox. Check the role and pending sync state
before changing policy.
Member identity (local interfaces, management/control endpoints, local SSH
settings) stays per member, so never replace the secondary's whole
configuration with the primary's file; a new static link can need
--peer-identity at initial pairing.
Conflicting concurrent revisions are rejected and stay pending: inspect
sentinel-configsync.service and the sync state, choose the change to keep,
and resolve the competing revision deliberately. A CLI commit on a member
that is not the owner (HA Backup or Fenced) still applies and replicates, and
ends with a warning naming this member, the owner and the term (or saying the
role could not be read).
A commit on the owner that changes the firewall policy:
| Effect | How long |
|---|---|
| Starts a new authority term: the witness grants the owner a new term for the new policy and the owner re-announces its VIPs (gratuitous ARP and neighbour advertisements). Expected; ownership does not move. | — |
| Closes the member's configuration gate for the data-plane transaction. Every attached link drops traffic, the HA sync link included: a few packets and about one witness renewal. The owner keeps its lease. | about 20–30 ms for up to 4,500 changed rule entries in our tests |
| Leaves the pair without failover until the standby has the new policy and the owner's state for the new term. | about 1–3 s in our tests |
Regression entry points
nix build .#checks.x86_64-linux.ha-pair -L
nix build .#checks.x86_64-linux.ha-two-node -L
nix build .#checks.x86_64-linux.ha-two-node-flow -L
nix build .#checks.x86_64-linux.ha-witness-failover -L
nix build .#checks.x86_64-linux.ha-napt-mixed-version -L
nix build .#checks.x86_64-linux.configsync -L
See the test inventory for scope and evidence rules. Legacy vocabulary is under system synchronization; it is not the recommended way to build a new fenced pair.
Migrate legacy state sync
sentinel configure
delete system conntrack-sync
commit
save
Unauthenticated UDP state replication is no longer supported. To retire legacy state replication, run the block above on both members before upgrading. That disables state transfer; it is not an HA migration and does not guarantee that existing connections survive failover.
Keeping legacy state sync, and what to re-test
An enabled system.conntrack-sync block needs explicit state peers and a
shared, random 32–1024-byte system.config-sync.secret on both members
(The HA secret). Listen-only replication is rejected. No
credential or management listener is configured automatically. Provision the
credential through a protected configuration or hidden prompt, not
command-line arguments or public logs. Configuration sync delivers policy over
HTTPS; the separate VCS2 TCP state transport authenticates flow updates but
does not encrypt them.
Before an image upgrade, save both configurations and review the intended pairing mode. Build a new fenced pair with the authenticated pairing above; do not silently turn a legacy VRRP deployment into a different failure model. Re-test real traffic and established flows on the same upgraded image. Rejection of an unsigned legacy configuration proves only the negative safety check, not positive HA acceptance.
HA configuration reference
Use this reference with two matching appliances and one independent witness. Keep console access and verify management on both members before enrollment. The operator runbook is published at Verify witness-backed HA.
Prepare and pair
- Set distinct member control addresses and configure the secondary’s HTTPS management endpoint. Generate the enrollment secret with
sentinel ha secret generate(32 random bytes as 64 hex digits) and set it assystem config-sync secreton both members. A short, patterned or word-like secret is refused at commit; see the HA secret. Keep the control path independent of fenced data interfaces, including bridge and VLAN dependencies. - On a member, run
sentinel ha witness-key. Supply the enrollment credential at the prompt. On the witness, configure only the derived key and cluster identifier. Allow both members’ control addresses and restrict the witness port at the host firewall. - On the primary, prepare the witness address with HA disabled. Run
sentinel ha pair <secondary-control-address>:<https-port>and enter the credential at the prompt. Use the actual endpoint for that secondary.
Example witness configuration. Replace the example addresses and both placeholder strings before applying:
[system.ha-witness]
listen = "192.0.2.13:5440"
cluster = "<derived-cluster-id>"
key = "<derived-64-hex-character-key>"
member = ["192.0.2.11", "192.0.2.12"]
Example prepared primary:
[system.ha]
enabled = false
witness = "192.0.2.13:5440"
Pairing validates both complete documents and records a durable enrollment plan. If a connection fails mid-enrollment, retry the same intended pairing; review conflicting configuration edits before discarding a plan.
Desired state and member identity
Replicate shared policy while retaining the distinct hostnames, control addresses, router IDs, interfaces and peer management identities. Include peer-specific facts when adding a static interface. Keep the membership and witness configuration consistent across the pair.
Witness timing budget
The members and witness must agree on a usable lease. Use measured control-plane RTT; latency and liveness affect renewal. The configuration requires:
2 × io-timeout-ms + 25 + 20 ≤ lease-ms
For example, a 200 ms I/O timeout needs a lease of at least 445 ms. A 500 ms lease meets that bound. Increasing the lease also increases the time authority can survive a lost renewal.
Authority, readiness and recovery
sentinel show ha
sentinel show vrrp
Inspect the authority owner and the backup’s replication readiness. If the backup reports that it is not ready, review the reason before maintenance. The former owner’s kernel fences data traffic when its lease expires. A valid lease cannot make an incomplete replica ready. Flow state replicates asynchronously; protect the replication path if it carries sensitive metadata. WireGuard reestablishes peer handshakes during takeover.
Acceptance checks
On a KVM-enabled x86-64 build host:
nix build .#checks.x86_64-linux.ha-pair -L
nix build .#checks.x86_64-linux.ha-witness-failover -L
The pair fixture exercises enrollment. The failover fixture observes traffic while the old active loses authority. Repeat the appropriate workload and failure cases in a staging environment with your link delays and topology.
Qualification limits
HA remains experimental. This runbook describes witness-backed configuration, not proof that a particular image passed failover or partition testing. For mode selection, migration and known failure modes, also read the current HA guide. Retain an independent recovery path and qualify the exact image and dependency cohort.
Management transactions and telemetry
Results apply only to the source/image and scope recorded below. Original findings are retained; use the documentation map for current guides.
Safe management and live inspection
Web/API edits are provisional. A worker applies the candidate while an independent recovery timer preserves the previous working configuration.
Confirm a management change
- Keep a local console and an authenticated session on the working address. Review the diff before applying the candidate.
- Reconnect on the intended address and select Keep change before the displayed deadline. Polling the status does not extend it.
- If the change fails, restore access on the previous path. The transaction reports whether it was confirmed, reverted, or failed during apply. An expired or stale confirmation returns HTTP 409.
The CLI session uses a separate workflow. After a CLI commit-confirm, confirm cancels its timer; use save to persist.
Inspect the API
| Request | Purpose |
|---|---|
GET /api/v1/config/transaction | Read the pending transaction and latest result. |
POST /api/v1/config/confirm | Confirm the exact pending transaction after testing the new path. |
POST /api/v1/config/revert | Request recovery of the preceding working configuration. |
GET /api/v1/telemetry | Receive authenticated server-sent telemetry events. |
Send credentials in an authorization header over HTTPS. A HTTP 409 response means the supplied identity or baseline is no longer current. Fetch the latest state before deciding whether to submit another edit. If the recovery worker reports repeated failure, inspect the appliance locally before accepting its current state.
Read telemetry
Inspect error fields alongside counters and rates. A failed probe is unavailable; it does not mean zero traffic. Slow consumers keep the latest snapshot and can detect gaps via event IDs. Use a separate log destination when a complete audit trail is required.
Verify
nix build .#checks.x86_64-linux.management -L
nix build .#checks.x86_64-linux.console -L
Use a KVM-enabled build host for the VM checks. For app-level UI tests, see the console test reference.
Optional fleet management
Results apply only to the source/image and scope recorded below. Original findings are retained; use the documentation map for current guides.
Optional fleet management
An enrolled node checks in over outbound HTTPS using mutual TLS. Signed controller requests can ask for telemetry or a provisional configuration change. Local forwarding and management continue when the controller is unreachable.
Enroll a node
Provision a controller CA, a client certificate and private key, and an enrollment-token file under /var/lib/sentinel/fleet/. Keep the directory root-owned (0700) and the private key and token accessible only by root (0600). Keep the controller’s command-signing private key separate from its transport credentials.
In System → Fleet enrollment, enter the controller URL, node ID, local credential paths and the base64 Ed25519 signing public key. A representative configuration is:
[fleet]
controller-url = "https://fleet.example.com"
node-id = "edge-a"
enrollment-token = "file:/var/lib/sentinel/fleet/enrollment-token"
ca-certificate = "/var/lib/sentinel/fleet/controller-ca.pem"
client-certificate = "/var/lib/sentinel/fleet/client.pem"
client-key = "/var/lib/sentinel/fleet/client.key"
signing-key = "<base64-ed25519-public-key>"
poll-interval = 5
Replace all example values with your enrolled identity. The server name must match the trusted certificate. Keep per-flow telemetry disabled unless it is required.
Verify check-in
sentinel fleet-poll
journalctl -u sentinel-fleet.service
Confirm the enrolled node ID at the controller. A check-in does not implicitly confirm a pending revision. Removing fleet configuration stops polling and preserves the local appliance.
Controller protocol v1
The node sends POST <controller-url>/api/v1/sentinel/check-in, authenticating
with its provisioned mTLS identity and an Authorization: Bearer header. The
request body is JSON:
protocol:1.node: the stable enrollednode-id.nonce: a new unpredictable 64-character hexadecimal challenge.revision: canonical SHA-256 revision of the current desired document.sequence,result: the last consumed command and its outcome.transaction: the same pending/completed state as the local transaction API.telemetry: null, or the snapshot requested on the preceding check-in.
The controller replies {"command": null} when idle, or
{"command": {"payload": "BASE64", "signature": "BASE64"}}. Both encodings use
standard padded base64. The decoded payload is UTF-8 JSON containing a positive
sequence and an operation. Unknown fields/actions are refused. The signature
is Ed25519 over these exact bytes, concatenated without JSON canonicalization:
UTF8("Velstra Sentinel Fleet command v1") || 0x00 ||
UTF8(node) || 0x00 || UTF8(request.nonce) || 0x00 || decoded_payload
The payload operations are:
{"sequence":1,"operation":{"action":"telemetry"}}
{"sequence":2,"operation":{"action":"apply","expected_revision":"current-revision","toml":"complete desired TOML"}}
{"sequence":3,"operation":{"action":"confirm","id":"pending-transaction-id","revision":"pending-revision"}}
{"sequence":4,"operation":{"action":"revert","id":"pending-transaction-id"}}
Each new command must have a higher sequence. An exact duplicate of the latest
consumed payload is idempotent; a conflicting payload at that sequence or an
older command is rejected. The high-water mark is flushed before side effects,
including commands that subsequently fail schema/CAS checks. After a lost
acknowledgement, inspect result and transaction on reconnect. If the node
reports an interrupted processing outcome, use those actual transaction
facts and issue a new sequence; do not assume an operation was applied.
apply uses the normal complete Appliance schema and CAS against
expected_revision. It cannot change the local-only trust settings; a
revision that differs from the running configuration in any of them is refused
with a message naming each section, and nothing is applied:
[fleet]— enrollment, controller URL, signing key, telemetry opt-in;[[system.login]],[[system.group]],[system.aaa]— accounts, SSH keys, password hashes, TOTP secrets, permissions, RADIUS/LDAP/TACACS servers and secrets;[update]— channel URLs, pinned public keys, subscription keys (the channel key also verifies local images);[system.ha],[system.ha-witness],[system.config-sync],[system.conntrack-sync]— pairing identity, witness secret, sync peers, secret and pinned fingerprint;[services.ssh],[services.web],[system.console]— how the local operator reaches the box.
A controller must send these sections exactly as the node has them. Changing
them is a local management act. Policy — rules, zones, NAT, interfaces,
routing, VPN tunnels, DNS/DHCP and other services — remains fleet-managed. The independent commit-confirm worker and
watchdog protect address, port, TLS, VLAN, routing and firewall changes. Wait for
transaction.pending.ready, verify reachability, then sign a separate confirm
for that identity and revision. Without it, the previous saved and working state
returns automatically, including across process death or reboot. Expired/stale
confirmations cannot resurrect a revision. Confirmed changes enter the ordinary
HA configuration outbox; provisional revisions are not replicated.
Fleet enrollment is member-local. HA pairing/config sync preserve each node's own identity, private-file paths and token. A source's fleet credential is not included in shared configuration deliveries.
Verify the implementation
Run cargo test --workspace --locked in the checkout and the fleet check for your revision on a KVM build host.
Use the configuration CLI
Run sentinel configure on the appliance. Edits belong to a candidate until you apply them. A star in the prompt signals outstanding changes.
Try a harmless edit
set system hostname edge-lab
compare
discard
The diff shows the hostname change. Discarding it leaves the running configuration untouched. Use ? or Tab after a path to discover the next field.
Choose a command
| Command in the session | Result |
|---|---|
show, set, delete | Inspect or edit the candidate. |
edit, up, top | Move through the configuration tree. |
compare, discard | Review or abandon pending edits. |
commit, save | Apply to the running system, then persist across reboot. |
commit-confirm 2, confirm | Apply provisionally with a two-minute window, then accept. Save explicitly for persistence. |
show system commit, compare N | List saved revisions or compare against revision N. |
rollback N | Apply and persist an archived revision. 0 is the newest. |
stateDiagram-v2
[*] --> Candidate: set / delete
Candidate --> [*]: discard
Candidate --> Running: commit
Candidate --> Provisional: commit-confirm N
Provisional --> Running: confirm
Provisional --> Saved: timer expires, saved baseline reapplied
Running --> Saved: save
commit alone does not survive a reboot: a future boot still reads the saved file.
Inspect the running appliance
sentinel show interfaces
sentinel show ip route
sentinel show ip bgp summary
sentinel show firewall statistics
sentinel show nat
At a configuration prompt, prefix operational commands with run. See remote changes for a worked confirmation and recovery sequence.
Read the applied configuration
sentinel show configuration reports the last successfully applied snapshot, or the saved configuration before the first live commit. It does not show another session's pending candidate. Treat configuration output as sensitive; use narrowed operational commands when sharing diagnostics. See commit, confirm and save for persistence and API differences.
System and management
Use the console when introducing new authentication methods. Verify a new administrator session before removing an existing working access path.
Security boundaries
Read the authentication and synchronization reference before changing accounts, AAA, TOTP or HA transport. It covers privilege revocation, password compatibility, persistent replay protection, sign-in lockouts and legacy-sync migration.
A management listen address does not restrict ingress interfaces. Test explicit destination ACLs from every untrusted segment. HA is experimental; policy sync and flow-state sync are distinct authenticated services, not proof of failover readiness.
Hostname
Change the hostname in the candidate, review it and apply it. Confirm a temporary remote change before persisting it.
set system hostname fw-a
Login accounts
Provision each administrator’s own SSH public key; keep the private key on that administrator’s device. The example assumes an account named alice.
set system login alice ssh-key <public-key>
Use the complete public-key line in place of the placeholder. Test login from a second session before altering the original account.
SSH daemon
Restrict the SSH listener to the management address and use the intended port. Test a separate administrator login.
set services ssh port 2222
set services ssh listen-address 10.0.0.1
HA config sync
Shared configuration and per-member identities must stay distinct. Use the HA mode and enrollment runbook for two-member enrollment and peer authority.
The receiver honors its local Web listener address and port even with the interactive Web UI disabled. A secret alone leaves the default loopback listener; explicitly configure a reachable control address on each member. Preserve receiver-local identity and review the legacy revision migration before upgrading.
HA conntrack sync
A standby needs compatible policy and current replicated state for an established flow to continue. Check replica readiness on both members before a maintenance failover.
State replication requires an explicit 32–1024-byte config-sync secret and at least one state peer. Unsigned UDP and listen-only replication are disabled. Authenticated framed TCP provides integrity, not confidentiality; isolate or encrypt the control link. Migration and transport details.
A second factor
Enroll the user’s TOTP device and test it with a synchronized appliance clock before relying on it.
set system login alice totp generate
Where a password is checked
External authentication can use RADIUS, LDAP or TACACS+. Keep a tested local recovery account and apply authentication changes with a confirmation window.
RADIUS
Configure the server address, timeout and a site-issued shared secret under set system aaa radius. Verify authentication and role mapping with a test account.
LDAP
Configure the endpoint, base DN and TLS under set system aaa ldap. This is a simple bind as the authenticating user, not a service-account directory search. Verify certificate trust and local group mapping; do not silently fall back to plaintext.
TACACS+
Configure the designated server and its shared secret under set system aaa tacacs. This integration authenticates users; it does not implement server-side TACACS+ authorization or accounting. Verify the locally configured group permissions as well as successful login.
Who gets in, and what they may do
Check the group assigned to the account, including any configurable default for directory users.
set system aaa default-group operators
The serial console
Match the console device and speed to the attached terminal or BMC console.
set system console device ttyS0
set system console speed 115200
How far back you can roll
Set the archive retention to the number of configuration revisions your change process needs.
set system commit-revisions 100
A history of the box itself
Enable local metrics collection when trends over time are needed in addition to live counters.
set system metrics enable true
Keyboard, locale and timezone
Match the console keyboard, locale and timezone to the operating environment. Verify the layout before entering a sensitive credential.
set system keyboard de
set system locale de_DE.UTF-8
set system timezone Europe/Berlin
When the clock cannot be trusted
Check synchronization before investigating suspicious timestamps, certificate validity or time-based login failures.
clock: 2021-01-14 03:22:57 UTC — NOT synchronised: no time source has set
this clock, so log timestamps, certificate expiry and time-based
rules are all unreliable
Check the result
sentinel show version
sentinel show system commit
Check time synchronization before testing a time-based factor. Inspect revision history before restoring an older configuration.
Authentication and synchronization safety
Source-level security contracts, not final-image release acceptance. Start with the system tasks; test a separate administrator session and retain console recovery.
set system login alice ssh-key ssh-ed25519 AAAAC3Nz…I alice@laptop
set system login alice hashed-password $y$j9T$<salt>$<digest>
set system login alice totp generate
set system aaa radius 10.0.0.50 secret a-shared-secret
set system aaa default-group operators
commit-confirm 2
Persistent logs
Before an update, or to diagnose an earlier boot:
journalctl --list-boots --merge
journalctl --merge -u velstra.service -u wren.service
Installed images retain /var/log on the data partition: the journal is bounded to 128 MiB, keeps 256 MiB free and expires entries after 14 days. --merge does not retrieve logs from remote cluster members.
What --merge adds
--merge includes retained logs from earlier machine IDs on an unprovisioned, stateless test VM.
Hostname
set system hostname fw-a
Applied live on commit and shown in the prompt.
Login accounts
Created on commit:
| Command | Meaning |
|---|---|
set system login <user> ssh-key <openssh-key> | An OpenSSH public key allowed to log in as this user (repeatable). |
set system login <user> password <password> | Hash a new local password with yescrypt; do not put plaintext commands in shell history or scripts. |
set system login <user> hashed-password <hash> | Import a supported crypt(3) hash, never a plaintext password. |
set system login <user> totp <base32-secret> | A one-time-code secret: the account then needs a code as well as a password. |
To import a hash generated off-box, use an interactive password prompt:
$ mkpasswd --method=yescrypt --rounds=5
admin@fw-a# set system login alice ssh-key ssh-ed25519 AAAAC3Nz…I alice@laptop
admin@fw-a# set system login alice ssh-key ssh-ed25519 AAAAC3Nz…J alice@phone
admin@fw-a# set system login alice hashed-password $y$j9T$<salt>$<digest>
SSH stays key-only unless the daemon enables password auth.
| Account | Administrator access (incl. passwordless sudo) |
|---|---|
in a local read-write group | yes |
| read-only, or an ordinary ungrouped user | no |
the configured, ungrouped built-in admin | yes, a bootstrap exception in both CLI and API, removed by explicitly assigning it a read-only group; it grants nothing to other ungrouped accounts |
Removing a managed account locks it, removes its managed SSH keys and administrator group, and terminates its login sessions and user jobs; homes are not deleted. Demotion also expires old sessions. Keep another administrator or a recovery console when removing or demoting your own account.
Password hashes
New local passwords use yescrypt cost 5 (16 MiB) with a random salt. Local Unix/API passwords must be 8–511 bytes with no NUL or line break.
Warning: imported MD5 and SHA-256 hashes do not grant password-based SSH/console access (the OS/PAM policy is unchanged). Reset those passwords to yescrypt before relying on OS login.
Legacy hashes, imported costs and OpenConnect credentials
Existing MD5-, SHA-256- and SHA-512-crypt hashes remain verifiable by the API; there is no automatic rehash, and the API's compatibility helper does not weaken the system-wide crypt policy. Rotate legacy local passwords to migrate them. Imported yescrypt costs are bounded (up to 32 MiB) for local Unix/API accounts.
Rendered OpenConnect VPN credentials also use cost-5 yescrypt, but retain their existing non-empty password-length compatibility. The root-private runtime credential file reuses an unchanged password's validated hash; a legacy SHA-512 hash migrates on apply. OpenConnect tunnel/restart acceptance still needs the final image's VM results.
Stable account IDs across boots and upgrades
The persistent, root-private /var/lib/sentinel/login-accounts.json registry keeps each managed local UID stable across boots and reserves retired UIDs. Retired admin accounts are not silently recreated with bootstrap privileges. Do not delete the registry to reset an account: corruption or UID drift fails closed.
When upgrading an appliance without this registry, only currently configured accounts are adopted: manually review Unix users removed before the upgrade. These lifecycle changes still require the final image's VM login/SSH acceptance results before release qualification.
SSH daemon
| Field | Meaning |
|---|---|
enable | Run the SSH daemon (true/false; default true). |
port | TCP port sshd listens on (default 22). |
listen-address | Restrict sshd to one local address (default: all). |
password-authentication | Allow password logins over SSH (default false, key-only). |
set services ssh port 2222
set services ssh listen-address 10.0.0.1
Warning: a listen address selects the destination IP, not an ingress interface; Linux can deliver traffic from another interface to it. An unzoned management NIC is deliberately unfiltered, so its address is not a management-only boundary. Likewise for the web console and HA's receiving API.
Isolation is opt-in policy, never automatic. Deny SSH and HTTPS to management address 10.0.0.1 from zone lan, keeping access on the management NIC and forwarding to other hosts on those ports:
set firewall rule deny-lan-management from lan
set firewall rule deny-lan-management proto tcp
set firewall rule deny-lan-management port 22,8080
set firewall rule deny-lan-management destination 10.0.0.1/32
set firewall rule deny-lan-management family ipv4
set firewall rule deny-lan-management action drop
commit-confirm 2
Repeat it for each untrusted ingress zone and every exposed management address; IPv6 needs its own rule with family ipv6 and the exact /128. Use a destination match, not a broad to rule or a combined source/destination rule. Verify access and denial before confirm and save; keep a local recovery console.
HA config sync
HA is experimental. Fenced pairing has witness and witnessless two-node modes with different partition behavior; neither is equivalent to legacy VRRP plus config sync. Read the HA pairing and recovery guide and its known failure modes before sentinel ha pair <peer-endpoint>. The pairing token is read with --secret-stdin or prompted for without echo.
How pairing authenticates
Pairing authenticates the first TLS connection before sending the bearer and records both member profiles in canonical appliance.toml.
sequenceDiagram
participant A as Sender
participant B as Receiver API
A->>A: commit queues a durable revision
A->>B: PUT /api/v1/config-sync (peer credential)
B->>B: materialize peer identity, validate whole document
B->>B: apply + persist (one transaction lock)
B-->>A: result
Note over A,B: unavailable peer: retried.<br/>A received revision never queues a reverse push.
CLI commits and API updates both queue revisions. The peer identity materialized for a paired revision includes management/control endpoints and interface addresses; new static links need their peer facts in system.ha.peer-identity, not an inferred address.
| Field | Meaning |
|---|---|
peer | Receiver endpoint, host or host:port (default port 8080). Leased HA uses exactly one peer. |
secret | Shared enrollment and config-sync credential (the peer credential). At least 32 random bytes; generate it with sentinel ha secret generate. It also enables the receiving HTTPS API. |
peer-fingerprint | Base64 SHA-256 management TLS public-key pin. Pairing records the authenticated peer pin. |
The receiving API honors services.web.listen-address and port even when services.web.enable = false. A secret alone leaves the default listener on 127.0.0.1:8080, so set a reachable control address explicitly on each peer; binding is not ingress isolation (see the management ACL).
What the peer credential may do
The config-sync secret is not the machine token; the API accepts it as the peer credential.
| May | May not |
|---|---|
read what a read-only account reads (the stack view uses status, show, telemetry/snapshot and system/health; pairing uses GET /api/v1/ha/enrollment) | PUT /api/v1/config or post configure lines |
push PUT /api/v1/config-sync | stage updates or end a commit-confirm window |
complete POST /api/v1/ha/pair | on an already paired member, post a different pairing (a repeat of the applied one is answered as applied) |
Enrollment hands over the configuration without accounts, AAA servers and update channels, so no password hash or TOTP secret reaches a peer. The root-only machine token /var/lib/sentinel/api-token stays the local full-access credential.
Minted-token records, and upgrading from a release that wrote the secret into the token file
Sentinel records the digest of every token it mints beside it (api-token.minted). Releases before this one wrote the secret into the token file. At the first apply after the upgrade, a token that is the configured secret, or that any archived configuration names (a secret since removed), is replaced by a fresh random token. Any other unrecorded token (an earlier release's own, or one an operator placed there) is kept and recorded.
A push or pairing never changes who manages the receiver: system login (keys, hashes, TOTP), system group, system aaa, update channels and keys, services ssh and system console stay its own; configure them on each member.
Warning: everything else is shared policy, applied as sent. A peer that holds the secret can set the pair's firewall, NAT, routing and VPN policy, and through pairing its HA identity. Keep the secret to the members.
Secret strength and throttling
The secret must be at least 32 bytes and estimate at 128 bits or more: 64 random hex digits (what sentinel ha secret generate prints) or 32 random bytes in base64 pass; a long passphrase is refused.
| Situation | Result |
|---|---|
weak secret at admission (commit, API, received push or pairing, config check) | refused |
| box upgraded with a weak secret | still boots and keeps its pairing, warns at every apply, hands out no enrollment proof (409), accepts no change until the secret is rotated on both members |
Why the estimate is strict, and the request limits
The estimate is deliberately pessimistic about anything composed: words, runs of one letter case, sequences (abcd, 1234) and repeats count for little. The reason: the unauthenticated HA proof lets anybody who can reach the management port test guesses against it offline, so a dictionary word is a lost pair.
- The proof is limited to ten per source address per ten minutes.
- After thirty invalid bearers from one source in ten minutes, that source's further invalid ones get
429(withRetry-After) for five minutes; a valid credential is still served, except the peer credential while the secret is weak. - Sign-out answers every bearer that is not a session with the same
401and counts it. - Every non-read use of the machine token or the peer credential is logged with its source address.
Rolling upgrades and legacy config sync
During a rolling upgrade a push names each base revision in two forms (current and older), so mixed members keep synchronizing both ways. Do not change accounts, AAA, update, SSH or console settings on the older member in that window: an older sender still pushes them, the updated receiver keeps its own, and the older sender's next push is then refused as a conflict.
Warning: before upgrading a legacy-sync pair, reconcile outstanding changes, verify delivery on both members, then upgrade both to the same reviewed version. Never delete participation fences to force an otherwise refused first synchronization.
Legacy config sync: what it preserves, and upgrade conflicts
Outside leased HA, legacy config sync can target multiple receivers. It preserves the receiver's web listen address/port, existing local address/identity facts, router ID, VRRP priorities, the source address of each BGP neighbour it already has (update-source) and its PPPoE server local-address, as well as the management trust above; other web settings, including TLS, remain synchronized policy. A new static interface must already have its receiver facts declared. Drive changes from one node to avoid competing desired states. Legacy VRRP/config-sync alone does not provide the witness's split-brain fencing guarantees.
The new endpoint-aware shared revision can reject a queued old base as a conflict. Preserve its outbox and receive-journal evidence for recovery.
HA conntrack sync
| Config sync | Conntrack sync | |
|---|---|---|
| Carries | desired policy | flow state |
| Transport | HTTPS (management API) | mutually authenticated framed TCP |
| Credential | system.config-sync.secret | derived from that same secret |
| Field | Meaning |
|---|---|
listen | Local state endpoint, numeric IP:port in leased HA (default port 5429). |
peer | Explicit state receiver endpoint. At least one is required; leased HA requires exactly one. |
interval | Optional poll interval in seconds; omit it in leased mode to use 50ms. |
The secret must be explicit and 32–1024 bytes, and at least one state peer is required. Legacy unsigned UDP and listen-only replication are disabled: before upgrading, migrate both members or remove the old state-sync block; an incompatible saved configuration is rejected, not downgraded.
Warning: authenticated TCP protects integrity, not confidentiality. Use an isolated HA network or a dedicated control WireGuard tunnel when flow metadata must stay private. Credential validation and transport selection alone do not establish HA flow-failover qualification.
What Sentinel never does, how flow state is transferred, and WireGuard promotion
Sentinel never selects unauthenticated UDP, invents a credential or widens a management bind. The explicitly configured secret activates the shared API with the listener settings above, including in state-only configurations.
The TCP transport polls every 50ms by default and transfers complete snapshots, updates and deletions for NAT, dual-stack firewall and SYN-proxy splice state. Kernel reads are batched; configuration/policy generations fence incompatible state. Leased HA also binds every transfer to the current witness authority. A former master imports authoritative successor state before preemption; an incomplete map installation does not advertise readiness.
WireGuard promotion uses the shared long-term VPN identity and authenticated learned public endpoints to initiate new handshakes. Ephemeral kernel session keys are not copied. The dedicated control tunnel remains member-specific and needs an independent declared underlay outside the fenced data links.
A second factor
set system login alice totp generate
generate makes the secret (160 bits, 32 base32 characters), prints the otpauth:// URI a QR code encodes, and prints the code that is current right now: check the phone agrees before you walk away. Treat the secret and URI as credentials; keep them out of screenshots and issue attachments.
flowchart LR
pw{Password<br/>correct?} -->|no| refuse([Refused])
pw -->|yes| totp{TOTP code<br/>correct?}
totp -->|no| refuse
totp -->|yes| consume[Consume code's counter<br/>durably] --> session([Session])
- Six digits, RFC 6238, thirty-second steps, one step of tolerance either side.
- Wrong password and wrong code are the same refusal from outside.
- A consumed code cannot be reused on that appliance, across API restarts and reboots, while its persistent state is retained; wait for the next code to log in again. This is per appliance, not cluster-global: keep time synchronized on every member.
- The private replay state fails closed if corrupt or unwritable; deleting it is not a safe workaround.
- No second factor on the serial console (the way in when the network is broken) or SSH (that belongs to sshd's own configuration).
Web sign-in limits
| Budget (ten-minute window) | Attempts | Then |
|---|---|---|
| per origin, over all accounts (IPv6: per /64) | 10 | 15-minute lockout |
| per account, per origin | 10 | 15-minute lockout |
| per account, from origins that never signed it in | 100 | refused (bounds a guess spread over many addresses) |
An origin that signed an account in during the last 30 days (while the API ran) is exempt from the last budget: a guess at admin from elsewhere does not lock out the administrator's workstation. A new origin can still be refused during such a guess: keep an SSH or serial recovery path. Throttled answers are 429 with Retry-After.
Clearing counts and a full tracking table
A successful sign-in clears its origin's and its pair's counts. When the table of tracked addresses is full of lockouts, new addresses share a small overflow budget instead of being refused outright.
Note: these limits are held in memory and reset when the API restarts; they are not cluster-wide or persistent protection.
Sessions and connections
| Limit | Value |
|---|---|
| Session lifetime | 30 idle minutes, 12 hours in all |
| Sessions | 16 per account (signing in again ends the least recently used one), 1024 per appliance |
Clock skew, connection caps and request deadlines
A session stamped more than five minutes in the future (minted while the clock was wrong) is not trusted once the clock is corrected.
Before any request is read, the listener caps open connections at 32 per source address (IPv6 /64), 256 per network (IPv4 /24, IPv6 /48) and 4096 in all; a connection over a cap is closed as soon as it is accepted. A request head must arrive whole within ten seconds, and HTTP/2 connections are pinged and closed when the peer stops answering. After authentication (and for the sign-in form), a request body must arrive within 30 seconds or the request is answered 408. Responses carry Strict-Transport-Security (browsers ignore it over plaintext and over a certificate they warned about).
Where a password is checked
flowchart LR
local[Local accounts] --> radius{RADIUS}
radius -->|accept / reject| ok([Decided])
radius -->|unreachable| ldap{LDAP}
ldap -->|accept / reject| ok
ldap -->|unreachable| tacacs{TACACS+}
tacacs -->|accept / reject| ok
tacacs -->|unreachable| none(["no authentication<br/>server answered"])
The order is fixed: local first (so the box stays enterable when the directory is not), then the servers in the order given, kinds in the order RADIUS, LDAP, TACACS+. The first server that answers decides; a refusal names its protocol.
RADIUS
| Field | Meaning |
|---|---|
secret | The shared secret (required). |
port | Server port (default 1812). |
timeout | Seconds to wait (default 3). |
set system aaa radius 10.0.0.50 secret a-shared-secret
set system aaa radius 10.0.0.50 timeout 2
PAP with a mandatory Message-Authenticator (attribute 80, HMAC-MD5) in every Access-Accept and Access-Reject; missing, duplicate or invalid ones are refused, with no unsigned downgrade.
Warning: RADIUS/UDP password hiding and integrity checks are not modern transport confidentiality. Keep the exchange on an isolated trusted network or a protected tunnel.
LDAP
A simple bind as the user, not search-then-bind, so no service-account password lives on the firewall.
| Field | Meaning |
|---|---|
base-dn | Where the accounts live (required). The bind DN is <user-attribute>=<username>,<base-dn>. |
user-attribute | The attribute naming an account (default uid; Active Directory usually wants sAMAccountName). |
tls | ldaps (default), starttls, or none. |
port | Default 636 for ldaps, else 389. |
timeout | Seconds to wait (default 5). |
set system aaa ldap dir.example.com base-dn ou=people,dc=example,dc=com
set system aaa ldap dir.example.com user-attribute sAMAccountName
starttls fails rather than falling back to plaintext. none is allowed, but commit warns that the bind password crosses in the clear. The username is escaped into the DN (RFC 4514), so a comma cannot turn it into a different DN.
TACACS+
RFC 8907 ASCII authentication over TCP. Authorization and accounting are not implemented: an account's group decides what it may do.
| Field | Meaning |
|---|---|
secret | The shared secret (required). |
port | Server port (default 49, TCP). |
timeout | Seconds to wait (default 3). |
set system aaa tacacs 10.0.0.49 secret a-shared-secret
set system aaa tacacs 10.0.0.49 timeout 2
Warning: RFC 8907 XORs the body against an MD5 chain over the shared secret, which the RFC calls obfuscation, not encryption. Keep the server on a trusted segment, like a RADIUS server.
Who gets in, and what they may do
set system aaa default-group operators
A directory account needs a local system login entry naming its group unless default-group is set; otherwise one server would admit everybody in the directory. A rejection ends the search; only an unreachable server passes to the next (diagram).
Interfaces and addressing
A DHCP WAN and a statically addressed LAN:
set interface eth0 zone wan
set interface eth0 address dhcp
set interface eth1 zone lan
set interface eth1 address 10.0.0.1/24
set interface eth1 address6 2001:db8:0:1::1/64
Set addresses and zones on the discovered device names (sentinel show interfaces). Keep the serial console or a separately connected management port available before moving a live link into a zone.
Bind physical identity before assigning zones
Predictable names can change after device replacement, firmware changes or VM hot-plug; a new device that inherits a name must not silently inherit a trust decision. Match the NIC's permanent MAC and cable role (sentinel show interfaces, ip -details link show), then pin each physical role:
set interface wan0 hw-id 52:54:00:10:00:01
set interface wan0 zone wan
set interface wan0 address dhcp
hw-id creates a .link name binding when the device appears; it is not MAC cloning, and a commit does not guarantee an immediate rename of an already active NIC. Keep console access and verify the binding after a controlled reboot before relying on it.
Warning: bind the management NIC separately on each HA member. Do not copy the primary's physical MAC bindings to the secondary.
Common fields
Inspect the discovered NIC names before assigning zones, addresses or MTU. The example at the top of this page sets the common fields for a DHCP WAN and a static LAN.
Zoned links stay down until the firewall has them
stateDiagram-v2
[*] --> Held: zoned link appears
Held --> Up: data plane attaches
Sentinel holds a zoned data interface down until the data plane attaches; sentinel show interfaces gives the reason. Restore the data plane from the serial console or an independent management path before treating a held port as a cabling problem.
Keep a way in that does not depend on the data plane
Keep a local or serial console, or a physically independent management interface, while changing data-plane attachment.
An unzoned management interface is outside the zoned dataplane hold, not an automatic security boundary. Bind SSH and the console to its tested address and isolate the network. A local listen address does not restrict ingress: Linux can route traffic from another interface to it. Verify explicit management ACLs from every untrusted segment, including on the standby; see management ingress.
VLANs (802.1Q / QinQ)
A name such as eth1.20 infers the parent and VLAN. Set the protocol explicitly for an 802.1ad service tag.
set interface eth1.20 zone iot # infers parent eth1, vlan 20
set interface eth1.20 address 10.0.20.1/24
Virtual interface types
Set the type and its parent or members. Build bridges, bonds, tagged interfaces and tunnels one end-to-end hop at a time.
Bridges & bonds
A bridge joins L2 ports; a bond groups physical links into one logical interface (configure the switch to match its mode).
set interface br0 type bridge
set interface br0 member eth1
set interface br0 member eth2
set interface br0 zone lan
set interface br0 address 10.0.0.1/24
set interface bond0 type bond
set interface bond0 bond-mode 802.3ad # or active-backup, balance-rr, …
set interface bond0 member eth3
set interface bond0 member eth4
Tunnels
Local and remote endpoints plus the tunnel link's address. Check underlay reachability first.
set interface gre1 type gre
set interface gre1 local 203.0.113.1
set interface gre1 remote 198.51.100.1
set interface gre1 key 42 # gre/gretap only
set interface gre1 zone tunnel
set interface gre1 address 10.255.0.1/30
PPPoE (VDSL / fibre)
The session runs over a physical parent with the ISP-assigned credentials; put zone and address on the appropriate logical interface.
set interface wan0 type pppoe
set interface wan0 parent eth0 # the raw NIC the session runs over
set interface wan0 zone wan
set interface wan0 pppoe username user@isp
set interface wan0 pppoe password <isp-password>
set interface wan0 mtu 1492
IPv6 addressing & prefix delegation
Request a delegated prefix upstream, carve a downstream subnet, and check the advertised prefix on a LAN client.
set interface wan0 address6 dhcp
set interface wan0 pd-from wan0 # request a prefix on the WAN
set interface eth1 pd-from wan0 # …carve a /64 for the LAN
set interface eth1 pd-subnet 1
Serving the LAN: DHCP & Router Advertisements
DHCP pool and router advertisements on the LAN interface. Keep the appliance's own address outside the dynamic pool.
set interface eth1 dhcp-server enable
set interface eth1 dhcp-server pool-offset 100
set interface eth1 dhcp-server pool-size 100
set interface eth1 dhcp-server dns 10.0.0.1
set interface eth1 dhcp-server static-mapping printer mac 52:54:00:aa:bb:cc ip 10.0.0.5
set interface eth1 router-advert enable
set interface eth1 router-advert prefix 2001:db8:0:1::/64
Egress QoS (bufferbloat)
Set the shaper bandwidth from the measured uplink rate, and compare latency under background traffic before and after enabling CAKE.
set interface wan0 qos discipline cake
set interface wan0 qos bandwidth 100mbit
set interface wan0 qos rtt internet
MACsec
Parent, peer identity and matching keys on both ends, with unique keys from the site's credential procedure. Tab completion under set interface <name> lists the required MACsec fields.
Clamping TCP MSS
An explicit MSS, or path-MTU mode, on an encapsulated path. Test large TCP transfers, not only small probes.
set interface tun0 mss 1360
set interface tun0 mss pmtu
Offload
Check the NIC driver's capabilities first and the active state after applying.
set interface eth0 offload gro true
set interface eth0 offload rxhash true
Router advertisements
Configure the advertised prefix, preference and lifetimes on the downstream link.
set interface eth0 router-advert enable
set interface eth0 router-advert prefix 2001:db8:1::/64
set interface eth0 router-advert managed true
set interface eth0 router-advert dhcp6-pool start 2001:db8:1::1000
set interface eth0 router-advert dhcp6-pool end 2001:db8:1::2000
DHCP reservations
A stable client MAC gets a reserved address; confirm the client renews the intended lease.
set interface eth0 dhcp-server static-mapping printer mac 00:11:22:33:44:55
set interface eth0 dhcp-server static-mapping printer ip 10.0.0.9
NIC hardware
Only settings the NIC and driver support; check the resulting link settings.
set interface eth3 ethernet speed 1000
set interface eth3 ethernet duplex full
set interface eth3 ethernet rx-ring 4096
set interface eth3 ethernet tx-ring 4096
set interface eth3 ethernet rx-usecs 50
set interface eth3 ethernet adaptive-tx true
Bridge detail
Configure the bridge and member-specific VLAN behaviour together. Confirm tagged and untagged endpoints reach the expected segment.
set interface br0 bridge stp true
set interface br0 bridge priority 4096
set interface br0 bridge hello-time 2
set interface br0 bridge max-age 20
set interface br0 bridge forward-delay 15
set interface br0 bridge ageing-time 300
set interface br0 bridge igmp-snooping true
set interface br0 bridge igmp-querier true
As a port of a bridge
Per-port settings go on the member; the L3 address stays on the bridge.
set interface eth5 bridge-port cost 100
set interface eth5 bridge-port priority 32
set interface eth5 bridge-port learning false
Bond detail
Match LACP or static bond parameters on the appliance and the switch.
set interface bond0 bond hash-policy layer3+4
set interface bond0 bond lacp-rate fast
set interface bond0 bond min-links 2
set interface bond0 bond primary eth3
set interface bond0 bond mii-interval 100
set interface bond0 bond arp-interval 2000
set interface bond0 bond arp-target 10.0.0.1
Cellular (wwan)
The carrier's APN and IP type. Test with a management path independent of the cellular link.
set interface wwan0 type wwan
set interface wwan0 zone wan
set interface wwan0 address dhcp
set interface wwan0 wwan apn internet
set interface wwan0 wwan ip-type ipv4v6
What is not verified here
Stubbed modem tests validate configuration rendering only. Check registration, carrier addressing and reconnection with the actual modem.
Wireless
Radio role and local regulatory settings. Validate with the physical adapter and intended client.
set interface wlan0 type wireless
set interface wlan0 zone lan
set interface wlan0 address 10.0.10.1/24
set interface wlan0 wireless mode access-point
set interface wlan0 wireless ssid velstra
set interface wlan0 wireless country DE
set interface wlan0 wireless channel 6
set interface wlan0 wireless band n
set interface wlan0 wireless wpa mode wpa2+wpa3
set interface wlan0 wireless wpa passphrase <pre-shared-key>
What is not here
Radio settings depend on hardware, firmware, driver and regulatory support. A rendered configuration does not validate RF behavior.
Route-based IPsec (vti)
Pair the VTI with its IPsec connection, then route the protected subnet over it (VPN recipe).
set interface vti0 type vti
set interface vti0 vti-key 42
set interface vti0 zone vpn
set interface vti0 address 10.255.0.1/30
set interface vti0 mss pmtu
Per-link IPv4 and IPv6 behaviour
Family-specific settings per interface. Check both addresses and the effective routes afterwards.
set interface eth0 ip disable-forwarding true
set interface eth0 ip proxy-arp true
set interface eth0 ip arp-cache-timeout 30
set interface eth0 ipv6 disable-forwarding true
set interface eth0 ipv6 no-link-local true
set interface eth0 ipv6 dad-transmits 2
set interface eth0 ipv6 accept-dad 2
The ARP block
Only where the link topology requires it; check neighbour resolution from both sides.
set interface eth0 ip arp-filter true # only answer for an address on this link
set interface eth0 ip arp-ignore true # the reply half of the same rule
set interface eth0 ip arp-announce true # source from an address on the target's subnet
set interface eth0 ip arp-accept true # learn from gratuitous ARP (faster failover)
DHCP client options
Set on the interface that requests the lease; check the values the server actually returns.
set interface wan0 address dhcp
set interface wan0 dhcp client-id mac
set interface wan0 dhcp host-name fw
set interface wan0 dhcp vendor-class-id sentinel
set interface wan0 dhcp user-class residential
set interface wan0 dhcp no-default-route true
set interface wan0 dhcp default-route-distance 210
set interface wan0 dhcp reject 192.0.2.9
Port mirroring
Name source and monitor ports explicitly; the monitor should receive the traffic without disturbing forwarding.
set interface eth1 mirror-ingress mon0
set interface eth1 mirror-egress mon0
Check the result
sentinel show interfaces
sentinel show ipv6 route
Match the observed names, addresses and link states to your intended topology. Verify tagging on both ends before changing a trunk.
Firewall, NAT and packet tracing
A deny-by-default edge in one session (run inside sentinel configure):
set interface eth0 zone wan
set interface eth0 address dhcp
set interface eth1 zone lan
set interface eth1 address 10.0.0.1/24
set firewall global default-action drop # deny by default
set firewall global stateful true
set firewall zone lan default-action accept # trust the LAN
set firewall rule no-smtp from lan # ...except direct mail
set firewall rule no-smtp proto tcp
set firewall rule no-smtp port 25
set firewall rule no-smtp action drop
set nat source wan-masq zone wan # masquerade everything leaving wan
compare
commit-confirm 2
Zones label interfaces, each zone has a default action, rules narrow it, and NAT rewrites addresses on the way through.
How a packet is judged
flowchart LR
in([Packet in]) --> gate
subgraph xdp [XDP ingress]
gate{Configuration<br/>gate} --> sv{Source<br/>validation} --> pol{State, blocklist,<br/>zone rules} --> syn[SYN proxy] --> dnat[Port-forward /<br/>load balancer]
end
dnat --> route[Kernel routing]
subgraph tc [TC egress]
epol{Egress rules} --> snat[Source NAT]
end
route --> epol
snat --> out([Packet out])
gate & sv & pol & epol -->|refused| drop([Drop])
Zone rules judge the packet as it arrived, before destination NAT; a configured port-forward admits its own traffic. The gate closes while a commit installs a new policy (below).
Note: see the support matrix for qualified features and known limits (IPv6 fragments are not translated, the SYN proxy is port-scoped and IPv4-only). Routed traffic uses kernel forwarding plus TC egress, not an established-flow XDP redirect fast path.
Asking before you send (packet trace)
Can a guest on lan0 reach SSH on a DMZ server? With a guest-deny rule in place:
$ sentinel trace --in lan0 tcp 10.0.0.200 10.9.0.10 22
...
verdict: drop (no-ssh-from-guests)
The trace shows the ingress zone, route, NAT translations and matched rule above the verdict. It reads the saved configuration; test a candidate file with --config, and get the intermediate steps as JSON with --json:
sentinel trace --config ./candidate.toml --json --in lan0 tcp 10.0.0.200 10.9.0.10 22
It models compiled configuration only: established state, dynamic routes and current multi-WAN health need live inspection. The console has the same walk under Policy → Packet trace.
Zones & posture
set firewall global default-action drop # deny by default
set firewall global stateful true
set firewall zone wan block-icmp true # quiet on the WAN
set firewall zone lan default-action accept # trust the LAN
Assign interfaces to zones first, then override only the zones that differ from the global default.
block-icmprefuses new inbound ICMP, even where a rule accepts it. Answers still arrive: echo replies to pings the firewall or a LAN host sent, and ICMP errors about a tracked connection (packet-too-big and fragmentation-needed included, so path-MTU discovery works). Outbound ICMP is not affected.- IPv6 neighbour discovery and MLD always pass on every zone, whatever its default action, rules or
block-icmp; a zone needs no ICMPv6 rule for IPv6 to work. - TCP/UDP with IPv4 options is dropped on stateful zones: it cannot be tracked, proxied or translated (RFC 7126 practice). A stateless zone judges it by its rules.
- Address family: an IPv4 address rule applies to IPv4 only, an IPv6 one to IPv6 only; a rule with no address applies to both unless
familylimits it.
Rules
set firewall zone firewall local true
set firewall rule mgmt-ssh from mgmt
set firewall rule mgmt-ssh to firewall
set firewall rule mgmt-ssh proto tcp
set firewall rule mgmt-ssh port 22
set firewall rule mgmt-ssh action accept
firewall is not a reserved name: local true makes a zone mean "this appliance". A rule's from zone is where the packet arrives:
direction | Applies to |
|---|---|
| (not set) | traffic arriving through the zone |
out | traffic leaving through the zone's links, including traffic this appliance sends |
both | both |
So from wan proto tcp port 25 action drop keeps SMTP out without stopping LAN hosts from sending mail.
A rule without proto is a zone default, not a data-plane rule: from lan action accept sets zone lan's default to accept. It cannot be narrowed (source, destination, groups, family, direction and log on it are refused), and it is refused itself when the zone sets default-action explicitly.
Overlapping rules on the same zone, protocol, port and address hold one verdict: the stricter wins (reject, then drop, then accept), in either order, and sentinel trace reports that rule. Where the winner's family or direction does not cover the other's, config check says which part is not enforced.
Zone policy IDs and upgrades
Zone policy IDs are derived from the zone name, so adding, removing or renaming one zone does not reset the connections of the others. The first commit after upgrading from an image that numbered zones by their sorted names changes every ID once and resets connection state once; on an HA pair, the two members report "policy differs" while they run different images during a rolling upgrade.
The destination zone
A local zone matches the addresses the appliance holds at run time: static addresses, DHCP and DHCPv6 leases, SLAAC addresses, and a VRRP address while this member holds it. So a DHCP management port is reachable by to firewall rules, and the rule never widens to other destinations. sentinel trace knows only configured addresses and says so when a destination could be a run-time address.
Any other destination zone binds its configured connected prefixes, not the eventual outgoing interface; routed prefixes behind it are not automatically included.
When a to zone is not enforced
A source-constrained port rule matches one address end, so its to label is not also enforced; broad rules set ingress posture, not a destination restriction. Read every advisory and verify the actual destination match.
Warning: a zone label is not an egress ACL. Admission refuses new or changed unsafe destination-zone deny rules, but this does not retroactively make unchanged legacy policy safe, and accept-rule advisories stay nonfatal. Use explicit destination matches for management isolation.
Rate limits
New flows per second (limit) with a short peak (burst):
set firewall rule ssh-in from wan
set firewall rule ssh-in proto tcp
set firewall rule ssh-in port 22
set firewall rule ssh-in action accept
set firewall rule ssh-in limit 5
set firewall rule ssh-in burst 10
Time-based rules
set firewall rule guest-wifi from guest
set firewall rule guest-wifi proto tcp
set firewall rule guest-wifi port 0-65535
set firewall rule guest-wifi action accept
set firewall rule guest-wifi schedule days mon,tue,wed,thu,fri
set firewall rule guest-wifi schedule start 09:00
set firewall rule guest-wifi schedule end 17:00
The schedule uses the appliance's local timezone. Rules are re-applied at every window boundary and whenever the clock is stepped (for example when NTP first synchronises after boot) or the time zone changes.
ICMP message types
# Answer pings from the management network, and nowhere else.
set firewall rule ping-mgmt from mgmt
set firewall rule ping-mgmt to firewall
set firewall rule ping-mgmt proto icmp
set firewall rule ping-mgmt icmp-type echo-request
set firewall rule ping-mgmt action accept
# Path MTU discovery has to work, whatever else is refused.
set firewall rule pmtu from wan
set firewall rule pmtu proto icmpv6
set firewall rule pmtu icmp-type packet-too-big
set firewall rule pmtu action accept
Protocols a rule can match
Tab completion lists the accepted names. Set the protocol before ports.
set firewall rule ping from wan
set firewall rule ping proto icmp
set firewall rule ping action accept
One rule for both protocols
set firewall rule dns-in proto tcp_udp
set firewall rule dns-in port 53
Blocking by country (GeoIP)
set firewall zone wan geoip-block CN,RU
Countries select prefixes from the GeoIP database in the image; review its coverage and freshness. A zone's blocklist and GeoIP countries name sources:
- Stopped: hosts in a listed country connecting in, and their packets to connections they started.
- Not stopped: LAN hosts reaching listed addresses; the answers are let back in. There is no outbound blocklist in this release: use
direction outrules for the protocols and ports concerned. - Newly listed addresses lose the connections they opened at once, but keep answering ones opened towards them. On a
stateful falsezone there is no connection to answer, so they cannot answer anything.
The global blocklist (set firewall blocklist) works the same on every zone. Each zone's policy carries its own copy of the global blocklist and global GeoIP countries, so a global entry costs one data-plane entry per zone plus one; config check refuses a total over the blocklist capacity.
Source validation (anti-spoofing)
Check routing symmetry before choosing strict.
set firewall zone wan source-validation strict
IPv6 and extension headers
A family-specific source prefix matches only within its family; test both families.
Groups (aliases)
Name a reused address, interface or port set once and refer to it from rules.
Some of a zone, not all of it
set firewall group interface-group trusted interface eth0,eth1
set firewall rule ssh-trusted from lan
set firewall rule ssh-trusted proto tcp
set firewall rule ssh-trusted port 22
set firewall rule ssh-trusted action accept
set firewall rule ssh-trusted interface-group trusted
Devices, not addresses
A MAC group classifies devices on the local segment; a MAC address does not authenticate them.
set firewall group mac-group printers mac aa:bb:cc:dd:ee:ff,aa:bb:cc:dd:ee:01
set firewall rule no-printers from lan
set firewall rule no-printers source-mac-group printers
set firewall rule no-printers action drop
Domain groups
Names resolve to addresses; recheck them when a service changes endpoints.
set firewall group domain-group trackers domain ads.example.com,metrics.example.net
set firewall rule no-trackers from lan
set firewall rule no-trackers proto tcp
set firewall rule no-trackers port 443
set firewall rule no-trackers action drop
set firewall rule no-trackers destination-group trackers
Groups whose members are decided elsewhere
Know who owns the membership, how it refreshes and what an empty group means.
Published lists
set firewall group feed-group bogons url https://example.org/bogons.txt
set firewall rule drop-bogons from wan
set firewall rule drop-bogons source-group bogons
set firewall rule drop-bogons proto tcp
set firewall rule drop-bogons port 22,443
set firewall rule drop-bogons action drop
A feed is matched by port rules, so it needs a proto (and ports for TCP/UDP); to block a source on every protocol, use the zone blocklist. Each member costs one data-plane entry per port and protocol, so keep port sets narrow. Every commit and refresh checks the merged feed against capacity and, if it no longer fits, keeps the running policy with an error.
People
Members are authenticated users, not addresses.
set firewall group user-group admins user alice,bob
set firewall rule admin-ssh from lan
set firewall rule admin-ssh source-group admins
set firewall rule admin-ssh proto tcp
set firewall rule admin-ssh port 22
set firewall rule admin-ssh action accept
NAT
Source NAT (masquerade)
set nat source wan-masq zone wan # masquerade everything leaving wan
Masquerade uses the uplink's current IPv4 address, including a DHCP lease. Plan for roughly 31,000 concurrent connections from one public address to one remote ip:port; across different remotes the state tables are the limit, not ports.
How public ports are allocated, and when they run out
Each connection gets its own public source port. Ports are scarce only between connections to the same remote address and port: each such endpoint has the whole 32768-port range (32768–65535) of the public address to itself, and connections to different endpoints never compete.
A new connection examines a fixed window of 128 candidate ports, so opening it costs the same however busy the box has been. If all 128 are taken, the opening packet is dropped and counted as egress_nat_no_candidate in sentinel show firewall statistics; the client's retransmission tries again:
| Concurrent connections to one remote ip:port, per public address | Share of the range | New connections refused |
|---|---|---|
| up to ~29,500 | 90 % | none measurable |
| ~31,100 | 95 % | about 0.15 % |
| ~32,400 | 99 % | about 27 % |
No NAT can exceed 32,768. A closed connection keeps its port for the closing timeout (30 s by default), so one public address sustains roughly a thousand connections per second from fresh client ports to one remote service.
When egress_nat_no_candidate grows, the remedy is more public addresses. In 1.0 masquerade translates to the one address of each uplink and has no address pool, so in practice: spread the traffic over another masquerading uplink. Logical expiry does not guarantee immediate physical reclamation; do not infer a supported connection limit from configured map sizes.
Deterministic CGNAT
Each internal address gets a known port block; check pool size against subscriber count.
set nat source wan-masq zone wan
set nat source wan-masq cgnat-block-size 512 # ports per internal address
set nat source wan-masq cgnat-base-port 32768 # optional; this is the default
Destination NAT (port-forward)
set nat destination web zone wan
set nat destination web proto tcp # tcp, udp or tcp_udp
set nat destination web port 443
set nat destination web to 10.0.0.10:8443
set nat destination web hairpin true
Hairpin needs a static IPv4 address on the external zone; on a DHCP or PPPoE uplink config check warns that it has no effect.
NAT64 / NPTv6
NAT64 translates between address families with a prefix and pool; NPTv6 translates between IPv6 prefixes.
set nat nat64 enabled true
set nat nat64 prefix 64:ff9b::/96
set nat nat64 pool 100.64.0.0/24
set nat nat64 interface eth1
set nat nat64 dns64 true
Load-balanced services
set load-balancer web zone wan
set load-balancer web vip 203.0.113.10
set load-balancer web proto tcp # tcp, udp or tcp_udp
set load-balancer web port 443
set load-balancer web backend 10.0.0.11:8443
set load-balancer web backend 10.0.0.12
Application-layer gateways: there are none
The data plane rewrites no protocol payloads. Use explicit application ports, passive endpoints or NAT traversal.
SYN-flood protection (SYN proxy)
set firewall syn-protect 443
set firewall syn-protect 8080 mss 1400
delete firewall syn-protect 443
Protect only the TCP ports that need it. A protected port is proxied on the zones that admit it: an accept rule for that TCP port on arriving traffic, a TCP port-forward of it, or a load balancer on it (a hairpin reflection does not count). Connections other zones open to that port elsewhere, such as LAN clients' outbound HTTPS under syn-protect 443, are not proxied. If no zone admits the port that way (the service sits behind a zone whose default action accepts), the proxy answers every IPv4 SYN to that port on any zone. config check says so, and names the zones a port is proxied on.
| Topic | Behaviour |
|---|---|
| IPv6 | Not proxied in 1.0. config check names zones where a protected port is reachable over IPv6 (a zone with an IPv6 address whose rules admit it, or any IPv6 zone when the port is proxied everywhere). |
| TCP options | Proxied connections lose window scaling, SACK and timestamps. |
| Zone | Must be stateful; config check refuses syn-protect on stateful false. |
| Port-forwards | Work, including port-changing ones (port 8080 to 192.0.2.10:80 with syn-protect 8080). |
| Servers that speak first | SMTP, FTP, POP, IMAP and SSH work. |
| A SYN flood | Costs one cookie reply per SYN and no connection state, so it does not displace protected connections. |
How long a proxied connection lives, and two consequences
A proxied connection lives exactly as long as its connection state, like every other connection through the box. The proxy keeps one record per proxied connection (its sequence offset), and the agent removes it once no live firewall or NAT state claims it: within about 30 s of that state ending, and only on the active member of an HA pair. So a proxied connection ends when its state does: idle longer than tcp-established (set firewall global conntrack tcp-established, 24 h by default), half-closed and idle longer than the half-close allowance (at least 120 s), or evicted when the state table is full. Idle proxied connections keep their records however many others come and go. Ending records costs the agent a pass over the connection-state tables every few seconds while a port is SYN-proxied.
- A client reusing a source port too soon. After a connection ends, its record stays until the agent removes it: at once plus up to about 30 s after a reset, the closing timeout (
set firewall global conntrack tcp-closing, 30 s by default) plus that after a normal close, or the half-close allowance (at least 120 s) when the box recorded only one side's FIN, as it does for a connection through a port-forward. A new connection from the same client address and port, inside that window, to a protected service whose server uses the same port (the same service, or another one forwarded to that port) is not admitted, and its own attempts keep the old record claimed while they last; the client's next attempt after that succeeds. - Half-closed connections after an HA failover. A proxied connection that one side had half-closed (sent its FIN while the other kept sending) is treated as closing with the ordinary closing timeout instead of the longer half-close allowance, because the FIN history does not replicate. If it then idles longer than that, the new active member ends it. Fully open connections are not affected.
Stateful tracking and idle deadlines
Timeouts in seconds; check existing flows before shortening one.
set firewall global conntrack tcp-syn 30
set firewall global conntrack tcp-established 86400
set firewall global conntrack tcp-closing 30
set firewall global conntrack udp 30
set firewall global conntrack udp-stream 180
set firewall global conntrack icmp 10
A packet the filter cannot parse
An explicit fail-closed posture drops packets the data plane cannot classify. Check the configured default and the drop counters before changing it.
Inspect state-map occupancy
show firewall states
show firewall capacity
show firewall counters
show firewall events
Rule capacity is checked before anything is applied; config check names the map, the count and the rules that fill it.
| Map | Holds |
|---|---|
| each rule trie | 8,192 entries (every port of a range, every group member and each protocol of tcp_udp is one entry) |
| rate-limited entries | 127 in total |
| blocklist | 262,144 entries per address family, across all zones |
capacity counts raw CONNTRACK, FW_FLOWS and SYN_FLOWS entries, including expired entries: not an active-connection count or a supported limit.
Reading show firewall capacity
A complete consistent sample warns at 80%; failed/changing samples report unknown and include sampling age. Matching scans remain non-atomic, so observed-below-threshold is not a health guarantee. Eviction counts are unavailable, and old agents report the query unavailable.
What a policy commit does to traffic
sequenceDiagram
participant Op as Operator
participant S as sentinel
participant A as Fabric agent
participant L as All attached links
Op->>S: commit
S->>S: config check (capacity, admission)
alt check fails
S-->>Op: error, nothing applied
else check passes
S->>A: new data-plane policy
A->>L: close configuration gate
Note over L: traffic dropped,<br/>about 20–30 ms
A->>L: open gate
S-->>Op: committed
end
Only a commit that changes the data-plane policy closes the gate. The pause is about 20–30 ms for up to 4,500 changed rule entries in our tests, on every attached link, the HA sync link included. On an HA owner the commit therefore also costs about one witness renewal; the owner keeps its lease (HA handbook).
Seeing what is on the wire
show flows # the live state table, with per-flow packets/bytes
show top-talkers # hosts ranked by the volume attributed to them
show firewall hits # rule-hit counters
Which rules are doing anything
show firewall hits (above) while ordinary traffic runs; sentinel trace for the decision behind one packet.
What was already refused (firewall log)
show firewall log # the last fifty lines
show firewall log 500 # a deeper read, up to 5000
show firewall log since 6h # a period instead of a count
log true on | Records |
|---|---|
a zone (set firewall zone <zone> log true) or everywhere (set firewall global log true) | every packet the firewall drops or rejects, with the reason |
a rule (set firewall rule <name> log true) | that rule's drops, and for an accepting rule each new flow it admits |
Packets of already admitted flows are never logged: forwarding, NAT and tunnelling are counted in show firewall statistics. A counter reason can be shared by several rules; a trace finds the candidates.
Log rationing and the console's live view
The journal is rationed: the agent writes at most a burst of 100 such lines and then 10 a second, and for every 10 s in which it held lines back one suppressed N data-plane log record(s) warning says how many. The drop counters still count every packet, and show firewall statistics reports the held-back total as log_lines_suppressed. A flood of logged drops therefore costs log lines, never the firewall's speed or the rest of the journal.
The console's live view is a different stream: on a logging zone or policy it shows every packet, accepted ones included. It is bounded and lossy (under load it skips packets) and it never reaches the journal.
Check the result
sentinel show firewall statistics
sentinel show firewall log
sentinel show nat
Compare counters and logs from normal traffic on an isolated test segment with the traced decision.
Routing protocols
set protocols static 192.168.50.0/24 via 10.0.0.254
set protocols bgp local-as 65001
set protocols bgp router-id 10.0.0.1
set protocols bgp network 10.0.0.0/24
set protocols bgp neighbor 10.0.0.2 remote-as 65002
compare
commit-confirm 2
flowchart LR
cand[Candidate:<br/>set protocols ...] -->|commit| wren[Wren]
peer([Peer routers]) <-->|BGP, OSPF, ...| wren
wren -->|best routes| fib[(Kernel FIB)]
fib --> show[sentinel show ip route]
Reach the directly attached peer first, then bring up the session. Review import and export policy before advertising production prefixes.
Qualification status
Sentinel is under development, not a qualified production release.
| Scope | Protocols |
|---|---|
| Core routing qualification | static routes, base BGP, OSPFv2, BFD, VRRP |
| Experimental | OSPFv3, RIP/RIPng, Babel, IS-IS, multicast, EVPN, extended BGP address families/features |
Core scope does not mean every option or peer combination has passed, and acceptance or a Wren-to-Wren adjacency is not third-party interoperability certification. The test inventory reproduces specific checks. HA pairing is also experimental, with failure-mode limits; ordinary VRRP is not split-brain fencing.
Warning:
- The IGMP/MLD proxy signals membership, but its forwarding-cache hook is not implemented: do not rely on it to deliver multicast data between interfaces.
- PIM
spt-thresholdis accepted but drives no runtime source-tree threshold: do not use it for traffic engineering.
Static routes
The next hop must be reachable on the chosen link.
set protocols static 192.168.50.0/24 via 10.0.0.254
set protocols static 2001:db8:50::/48 via 2001:db8:0:1::254
Routes belong in the configuration. Wren owns every kernel route tagged with a
protocol it uses (static, bgp, ospf, rip, isis, babel) and removes
any it did not install at its next reconcile, so a route added by hand with
ip route add ... proto static disappears. A route added outside the
configuration must carry another protocol, such as the default boot.
BGP
Match AS numbers with the peer; exchange only explicitly selected prefixes and policies (example at the top).
OSPF (v2) & OSPFv3 (IPv6)
Area, timers and network type must match on both ends.
set protocols ospf interface eth1 area 0.0.0.0
set protocols ospf network-type point-to-point
set protocols ospf redistribute static
set protocols ospf3 interface eth1 area 0.0.0.0 # IPv6
RIP / RIPng / Babel / IS-IS
Limit it to the intended interfaces. Babel on a transit link:
set protocols babel interface eth1
set protocols babel network 10.0.0.0/24
VRRP (first-hop redundancy)
Same VRID and virtual address on both members, distinct priorities. Witness-backed HA has additional authority requirements.
set protocols vrrp lan-vip interface eth1
set protocols vrrp lan-vip vrid 20
set protocols vrrp lan-vip priority 200 # 100 on the backup
set protocols vrrp lan-vip virtual-address 10.0.0.1
set protocols vrrp lan-vip prefix-length 24
BFD
Match the session on both ends; confirm its state before coupling it to route withdrawal.
VRFs, multicast & policy
Use a VRF when address space overlaps; prefix lists and route maps control redistribution and advertisements.
Routes that go nowhere
set protocols static 203.0.113.0/24 blackhole true
set protocols static 203.0.113.0/24 distance 254
Policy routing
set policy route guests-out source 10.9.0.0/24
set policy route guests-out table 100
Sending a route somewhere else
set policy route-map to-transit rule 10 set next-hop 2001:db8::1
What may be redistributed
Limit redistribution to the configured source protocols and filters.
Multicast and VRFs
set protocols multicast enabled true
set protocols multicast igmp true
set protocols multicast interface eth0 role downstream
set protocols vrf tenant-a table 100
set protocols vrf tenant-a interface eth1
show multicast # the kernel's forwarding cache
show vrf # the instances that are running
Between segments: PIM-SM
Experimental, on a separate kernel multicast-routing path; it does not complete the proxy's data forwarding. Test real sender-to-receiver delivery, not only a commit or show multicast.
set protocols multicast interface eth0 role querier
set protocols multicast interface eth1 role upstream
set protocols multicast pim enabled true
set protocols multicast pim rp-address 10.0.0.9
set protocols multicast pim interface eth0
set protocols multicast pim interface eth1
BGP: aggregates, authorisations, confederation, RPKI
set protocols bgp aggregate 10.0.0.0/8 summary-only true
set protocols bgp roa 192.0.2.0/24 origin-as 64500
set protocols bgp confederation id 65000
set protocols bgp rpki rtr 192.0.2.1:3323
EVPN: one tenant network across several boxes
set protocols bgp local-as 65001
set protocols bgp neighbor 10.0.0.2 remote-as 65001
set protocols bgp neighbor 10.0.0.2 evpn true
set evpn vtep-ip 10.0.0.1
set evpn underlay-interface eth0
set evpn encapsulation vxlan
set evpn instance tenant-a evi 100
set evpn instance tenant-a vni 10100
set evpn instance tenant-a rt-import rt:65001:100
set evpn instance tenant-a rt-export rt:65001:100
set evpn instance tenant-a interface eth1
flowchart LR
subgraph A [Box A]
pa[Tenant port eth1] --- ia[instance tenant-a<br/>VNI 10100]
end
subgraph B [Box B]
ib[instance tenant-a<br/>VNI 10100] --- pb[Tenant port]
end
ia <-->|BGP EVPN routes| ib
ia <-.->|VXLAN over underlay| ib
Segments and tenants
An instance is a layer-2 segment: a VNI, its route targets and its local ports. An ip-vrf adds routed (type-5) tenant prefixes:
set protocols vrf blue table 100
set evpn ip-vrf blue l3-vni 10999
set evpn ip-vrf blue advertise-prefix 10.20.0.0/24
set evpn ip-vrf blue router-mac 02:00:00:00:00:01
What is refused, and why
- no BGP router;
- a route target that is not
rt:asn:value(such as the bare65001:100); - a tenant port that is also the underlay;
- two segments sharing a VNI, or an
ip-vrfwhosel3-vnicollides with one; - an
ip-vrfnaming a VRF that does not exist.
Why each is refused
| Refused | Why |
|---|---|
| No BGP router | EVPN's control plane is BGP; without one the overlay would carry frames toward peers nobody ever announced. |
A route target that is not rt:asn:value | The routing daemon refuses it; accepting it would commit a configuration that does not start. |
| A tenant port that is also the underlay | An interface cannot be both inside and outside the tunnel. |
| A shared VNI | The VNI is the data plane's segment id; sharing it puts two tenants on one wire. |
| A missing VRF | A type-5 route is imported into a routing table, which has to exist for the routes to land. |
Check the result
sentinel show ip bgp summary
sentinel show ip route
sentinel show ipv6 route
A healthy session does not mean the import policy accepted the route: check the learned prefix and next hop too.
Network services
A LAN resolver and time server on eth1:
set services dns upstream 9.9.9.9,1.1.1.1
set services dns serve-on eth1
set services ntp upstream pool.ntp.org
set services ntp serve-on eth1
compare
commit-confirm 2
Bind every service to the intended interfaces and addresses, and substitute your own resolvers, networks and credentials for the lab values.
DNS (LAN resolver)
set services dns upstream 9.9.9.9,1.1.1.1
set services dns serve-on eth1
set services dns host-override nas.home 10.0.0.5
set services dns blocklist ads.example.com
Encrypted DNS upstreams
set services dns upstream 9.9.9.9
set services dns secure-upstream tls://dns.quad9.net
set services dns secure-upstream https://dns.quad9.net/dns-query
Who may ask, and what is never asked
allow-from limits the clients; dont-query names domains never forwarded upstream.
set services dns allow-from 10.0.0.0/8,fd00::/8
set services dns dont-query 168.192.in-addr.arpa
NTP server
Confirm the appliance clock is synchronized before serving it.
set services ntp upstream pool.ntp.org
set services ntp serve-on eth1
LLDP, SNMP, mDNS
Trusted interfaces only; a collector should reach only what it needs.
set services lldp enable true
set services snmp community <read-only-community>
set services snmp allow 10.0.0.0/24
set services mdns interface eth1,eth2
Web console
Keep working local access while changing HTTPS settings.
set services web enable true
set services web port 8443
set services web listen-address 10.0.0.1
TLS
The console and API share the management certificate. Validate its identity from a trusted path before sending credentials.
set services web tls-cert /var/lib/sentinel/pki/web/fullchain.pem
set services web tls-key /var/lib/sentinel/pki/web/key.pem
SSH log level
set services ssh loglevel VERBOSE
Dynamic DNS
Provider, hostname and a scoped provider credential go under services dyndns. Check the DNS answer after the uplink address changes.
DHCP relay
set services dhcp-relay interface eth1,eth0 # client + upstream links
set services dhcp-relay server 10.0.100.10 # IPv4 upstream (uses the link's giaddr)
set services dhcp-relay server6 2001:db8:100::10 # IPv6 upstream (or ff05::1:3, the relay multicast)
UDP broadcast relay
Relay only the required UDP port between the selected segments.
set services broadcast-relay wol port 9
set services broadcast-relay wol interface lan
set services broadcast-relay wol interface guest
Reverse proxy / L7 load balancer
set services reverse-proxy web port 443
set services reverse-proxy web certificate site-cert
set services reverse-proxy web backends 10.0.0.10:8080,10.0.0.11:8080
Remote syslog
set services syslog target 10.0.0.9
set services syslog target logs.example.com port 6514
set services syslog target logs.example.com proto tcp
set services syslog target logs.example.com level warning
Syslog facilities
set services syslog target 10.0.0.9 facility auth,local7
Alert notifications
Send a test notification after configuring.
set services alerts webhook https://hooks.example.com/sentinel
set services alerts mail to noc@example.com
set services alerts mail relay smtp.example.com
set services alerts mail user fw@example.com
set services alerts mail password <secret>
Flow export (IPFIX)
set services flow-export collector 10.0.0.50:4739
set services flow-export interval 30
set services flow-export domain 7
Intrusion detection
flowchart LR
traffic([Traffic on the<br/>monitored interface]) --> ids[IDS]
ids --> alerts[show ids alerts]
ids -->|only with block-on-alert| block[Block]
It detects, it does not block
Blocking is off by default. Watch alerts on the normal workload first.
Reading alerts
show ids # what is watched, and whether the detector runs
show ids alerts # the 20 most recent
show ids alerts 100
Acting on an alert
Review alert quality before enabling block-on-alert, and keep critical management addresses in the configured exclusion list.
Refusing a server by name (SNI)
Needs a visible server name in the handshake; encrypted or absent names are not matched.
set services ids interface eth0
set services ids block-on-alert true
set services ids sni-block example.com
Captive portal
Bind the portal to a guest zone, with a unique local passphrase from your credential process.
What holds the zone
The portal applies to the designated guest zone. Check that address assignment, DNS and the portal itself work before admission.
How a device finds the page
DHCP can advertise the portal URI with option 114, for clients that implement captive-portal discovery.
Seeing it
show portal
show portal sessions
What a portal is not
Admission is not device authentication: a MAC address is only a local identifier.
Port mapping (NAT-PMP)
Enable only on a trusted client zone.
set services port-mapping zone lan
set services port-mapping wan-zone wan
set services port-mapping max-lifetime 7200
What a mapping is
Each live mapping has an owner and an expiration; check them on the appliance.
What is refused
show port-mapping
clear port-mapping # close every mapping hosts opened
clear port-mapping tcp 51820 # or just one
NAT-PMP, not UPnP
Clients that need UPnP IGD need another integration.
Check the result
sentinel show interfaces
sentinel show version
From an authorized LAN client, query the resolver and open the HTTPS address. Check the clock before trusting TLS expiry or log timestamps.
VPN and certificates
A site-to-site IKEv2 tunnel between 10.0.0.0/24 and 10.1.0.0/24:
set vpn ipsec branch local 203.0.113.1
set vpn ipsec branch remote 198.51.100.1
set vpn ipsec branch local-subnet 10.0.0.0/24
set vpn ipsec branch remote-subnet 10.1.0.0/24
set vpn ipsec branch psk <pre-shared-key>
compare
commit-confirm 2
Assign addresses, routing policy and firewall zones explicitly: a successful handshake alone does not establish forwarding to a protected subnet.
Which VPNs this appliance carries, and which it will not
| Use case | Choose |
|---|---|
| a key-based peer | WireGuard |
| IPsec interoperability | IKEv2, policy- or route-based |
| a compatible TLS remote-access client | OpenConnect |
IPsec (site-to-site, IKEv2)
Match the two IKEv2 endpoints and the protected subnets at both ends (the example above). Provision independent site credentials through an approved local process.
Route-based tunnels (VTI)
flowchart LR
lan([LAN host]) --> rt[static route<br/>10.1.0.0/24 dev vti0]
rt --> vti[vti0<br/>vti-key 42]
vti --> sa[IPsec branch] -->|encrypted| peer([198.51.100.1])
Bind a VTI to its IPsec tunnel, then route the remote networks over the VTI.
set interface vti0 type vti
set interface vti0 vti-key 42
set interface vti0 zone vpn
set interface vti0 address 10.255.0.1/30
set interface vti0 mss pmtu
set vpn ipsec branch local 203.0.113.1
set vpn ipsec branch remote 198.51.100.1
set vpn ipsec branch psk <pre-shared-key>
set vpn ipsec branch vti vti0
set protocols static 10.1.0.0/24 dev vti0
WireGuard
The interface, its tunnel address, and each peer's public key and allowed prefixes. The peer endpoint must be reachable through the underlay.
set interface wg0 type wireguard
set interface wg0 zone vpn
set interface wg0 address 10.9.0.1/24
set vpn wireguard wg0 private-key generate
set vpn wireguard wg0 listen-port 51820
set vpn wireguard wg0 peer <peer-pubkey> allowed-ips 10.9.0.2/32
set vpn wireguard wg0 peer <peer-pubkey> endpoint peer.example.com:51820
set vpn wireguard wg0 peer <peer-pubkey> keepalive 25
OpenConnect (road-warrior)
The server certificate, client address pool, DNS and permitted routes. Give each user a separate credential.
set vpn openconnect certificate vpn-cert
set vpn openconnect pool 10.99.0.0/24
set vpn openconnect zone vpn
set vpn openconnect dns 10.0.0.1
set vpn openconnect routes 10.0.0.0/24
set vpn openconnect user alice password <secret>
PKI
A local CA and a certificate with the intended subject, alternate names and usage. Review issuance and expiry with sentinel show pki. For a public ACME service, use the separately documented ACME path.
set pki ca lab-ca common-name "Lab CA"
set pki certificate vpn-cert ca lab-ca
set pki certificate vpn-cert common-name vpn.example.com
set pki certificate vpn-cert subject-alt-name DNS:vpn.example.com
set pki certificate vpn-cert usage server
ACME issuance
The challenge host must be reachable; check the certificate's names and expiry after issuance. For an internal CA, distribute the issuing CA through your own trust policy.
set firewall rule acme-challenge from wan
set firewall rule acme-challenge action accept
set firewall rule acme-challenge proto tcp
set firewall rule acme-challenge port 80
Check the result
sentinel show vpn ipsec sas
sentinel show pki
sentinel show ip route
For IPsec, check the active security associations and reach the remote subnet from an authorized client. Check certificate expiry for TLS-based services.
Multi-WAN and traffic steering
Declare each WAN interface, gateway and health target, then choose how the router selects a path. Use targets reachable independently through each uplink.
Multi-WAN
This example gives a DHCP uplink priority over a statically addressed backup. Both interfaces must already have the intended zones and outbound NAT.
set multiwan mode failover
set multiwan uplink eth0 priority 10
set multiwan uplink eth0 gateway dhcp
set multiwan uplink eth0 check target 1.1.1.1
set multiwan uplink eth1 priority 20
set multiwan uplink eth1 gateway 192.0.2.1
set multiwan uplink eth1 check target 9.9.9.9
flowchart LR
chk{eth0 health<br/>check 1.1.1.1} -->|passing| p10[Use eth0<br/>priority 10]
chk -->|failing| p20[Use eth1<br/>priority 20]
Software updates
Update channels are a separate lifecycle. See review and stage an appliance update to check trust, inspect a specific offer and verify the new boot slot.
SD-WAN: steering, not just failover
A steering policy matches traffic and tries uplinks in preference order. Link-health thresholds can distinguish a reachable link from one that meets the latency and loss budget.
Out of SLA is not the same as down
Configure latency, jitter or loss thresholds on the intended uplink. Check measured samples as well as basic reachability.
set multiwan uplink eth1 check target 9.9.9.9
set multiwan uplink eth1 check latency 80
set multiwan uplink eth1 check loss 2
Steering policies
Match a traffic class and specify the uplinks in the order it should try. Check the behavior of strict mode before applying.
set multiwan policy voip proto udp
set multiwan policy voip destination-port 5060
set multiwan policy voip uplink eth1,eth2
set multiwan policy voip strict true
Seeing it
Inspect the selected uplink and the recent health observations for each configured policy.
show multiwan
Check the result
sentinel show multiwan
sentinel show ip route
Check the preferred uplink, its recent measurements and the selected route. Test one policy in a lab before introducing an SLA threshold.
Worked configurations
Use a disposable VM for these examples. Check NIC names, peer addresses and ownership of the saved configuration before applying them to any appliance.
Home / SOHO router
Start with an installed VM and the admin account created by the installer. The quickstart applies a WAN DHCP client, a LAN address, a DHCP pool, DNS, masquerading and a LAN-only HTTPS listener. Preview the complete candidate with compare before applying.
Branch office with a site-to-site VPN
For an IKEv2 connection, match the peer identity, local and remote subnets, and security policy at both ends. The IPsec recipe shows the configuration.
sentinel show vpn ipsec sas
sentinel show ip route
After negotiation, verify the security association and a connection from one protected subnet to the other.
Dynamic-routing core (OSPF)
Assume both ends of a directly connected, addressed transit link belong to the backbone area. On this router:
set protocols router-id 10.255.0.1
set protocols ospf interface eth1 area 0.0.0.0
set protocols ospf network-type point-to-point
compare
Match area, timers and network type on the peer. After applying, inspect sentinel show ip ospf neighbors and sentinel show ip route.
Active/standby HA pair
Two appliances can elect a primary using authenticated heartbeats. If all peer paths fail, both members can become active. An optional independent witness arbitrates ownership and the old owner is fenced when its lease expires. Compare the two pairing commands.
sentinel show ha
sentinel show vrrp
Check authority, readiness and the advertised VIP separately.
Qualification and HA boundaries
These are development examples. HA is experimental: distinct identities, hardware bindings and an independent recovery path are required. Legacy VRRP plus config sync is not a fenced cluster and does not guarantee NAT-flow survival through a partition. Follow the HA safety and migration guide, and run pairing and flow-continuity tests on the exact intended image.
What runs on the appliance
Sentinel separates day-to-day configuration from the image that boots the box.
flowchart LR
op([CLI / web console]) -->|candidate| sentinel[Sentinel<br/>validate + reconcile]
sentinel --> fabric[Fabric<br/>eBPF/XDP policy]
sentinel --> wren[Wren<br/>routing]
sentinel --> networkd[systemd-networkd<br/>links + addresses]
sentinel -->|save| conf[(appliance.toml<br/>data partition)]
conf -->|boot-time reconcile| sentinel
store[[Verified store<br/>A/B slot]] -.->|boots| sentinel
Follow a configuration change
| Component | Responsibility |
|---|---|
| Sentinel | Validates the candidate and reconciles the running services. |
| Fabric | Loads eBPF/XDP policy for filtering, NAT and packet forwarding. |
| Wren | Exchanges routes and tracks routing state. |
| systemd-networkd | Configures links and addresses from generated units. |
sentinel show interfaces shows live addresses. sentinel show ip route shows routing state. Trace a packet to inspect the static forwarding decision.
Follow a reboot
The appliance reads its saved configuration from /var/lib/sentinel/appliance.toml. A boot-time reconcile restores the running services. System software boots from a verified store; an A/B update prepares the inactive slot.
What commit, confirm and save do
A configuration change reconciles running services without rebuilding or rebooting the OS.
Apply a reversible change
set system hostname branch-a
compare
commit-confirm 2
Run these in a configuration session with a saved baseline. Verify management access from a second session, then confirm before the timer expires and save.
stateDiagram-v2
[*] --> Candidate: set / delete
Candidate --> Candidate: compare
Candidate --> [*]: discard
Candidate --> Running: commit
Candidate --> Trial: commit-confirm N
Trial --> Running: confirm
Trial --> Saved: timer expires, saved baseline reapplied
Running --> Saved: save
Saved --> [*]: survives reboot
Choose the correct operation
| Operation | Effect |
|---|---|
compare | Inspect pending changes before applying. |
commit | Apply to running services. A future boot still reads the saved file. |
commit-confirm N | Apply provisionally for N minutes, with a saved baseline for recovery. |
confirm, then save | Cancel the CLI rollback timer, then persist the running configuration. |
discard | Drop candidate edits that have not been committed. |
rollback N | Apply and persist an archived revision. 0 is the newest. |
State and privilege boundaries
| Topic | Rule |
|---|---|
| What reads show | The last successfully applied snapshot (the saved file before the first live commit), not an open session's candidate. A stale candidate must not overwrite a newer applied snapshot. |
| Offline editing | --no-apply requires an explicit configuration file. |
| Piped input | Stops on the first refusal; it does not undo earlier successful commits. |
| API batches | Validated before the provisional transaction opens. |
| CLI vs API | They share the compiler, not one transaction journal. CLI commit does not save; an API provisional apply persists its trial under its own recovery protocol. Do not infer one interface's persistence behavior from the other. |
A local read-write group grants administrator access, including passwordless sudo. Read-only and ordinary ungrouped users do not receive it; the explicitly configured, ungrouped built-in admin is a bootstrap exception. Account removal or demotion terminates existing sessions and jobs. Keep an independent administrator or recovery console.
Recover a partial apply
Sentinel compiles the candidate before applying it and serializes concurrent applies. The firewall, routing and hostname stages track undo actions. A later service-stage failure can leave a mixed state: read the failure, retain console access and restore a known saved revision. See the operator walkthrough.
Validate in a VM
nix build .#checks.x86_64-linux.commit -L
This check verifies live apply and persistence across reboot.
How A/B boot selection works
The updater writes the inactive system slot. Each slot pairs a read-only store with its verity tree. Configuration lives on a separate writable data partition.
Read the boot state
sentinel show version
bootctl status
On the running appliance, identify the current slot and boot entry before staging a replacement.
Follow an update
flowchart TD
stage[Stage: write inactive store + verity,<br/>select candidate with +3 tries] --> boot[Reboot: loader tries candidate]
boot --> health{Boot health checks pass?}
health -->|yes| bless[Blessed: counter removed,<br/>candidate becomes the working slot]
health -->|no| left{Tries left?}
left -->|yes| boot
left -->|no| prev[Loader boots the previous<br/>blessed slot]
| Partition | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Content | ESP | verity A | store A | verity B | store B | data |
The previous working slot stays available throughout. The boot mechanism protects against a candidate failing to boot. An operator still has to check management connectivity and forwarding after startup. See the update runbook.
Run the fallback check
nix build .#checks.x86_64-linux.bootfallback -L
Run on a KVM-enabled build host.
Safety boundaries
Fallback needs a previously bootable, blessed slot; a fresh installation with no working predecessor cannot promise automatic recovery. Keep a console and verify the actual selected entry, not only a configured default.
--allow-unsigned permits only an explicitly trusted Community source. It does not bypass active-disk, boot-selection or identical-active-GUID refusal. Native Enterprise appliances reject the Community image writer; use their signed channel workflow.
Verify the operating-system store
The kernel reads the immutable Nix store through dm-verity. A root hash embedded in the unified kernel image anchors the verification tree.
flowchart LR
sb[Secure Boot<br/>verifies UKI signature] --> uki[Unified kernel image<br/>embeds root hash]
uki --> verity[dm-verity tree<br/>verity partition]
verity --> store[(/nix/store<br/>read-only)]
data[(Data partition: config, credentials<br/>not covered by verity)]
Inspect a booted image
sentinel show version
findmnt /nix/store
lsblk -f
Check the boot identity, the read-only store and the separately mounted data partition. A development VM has a different boot path.
Know what is protected
dm-verity checks the contents of the system store as they are read. Configuration, credentials and certificates live on the writable data filesystem. Protect data at rest with installer encryption. Secure Boot verifies the code and kernel image upstream of the root hash.
Validate the image
nix build .#checks.x86_64-linux.verified-boot -L
The fixture boots the image under QEMU/OVMF and checks the verified system reaches multi-user operation.
Verify the UEFI boot chain
Sentinel signs systemd-boot and the unified kernel image at image-build time. Firmware enrollment determines which signer the machine trusts.
flowchart LR
pk[PK] --> kek[KEK] --> db[db]
db -->|signs| boot[systemd-boot]
db -->|signs| uki[Unified kernel image]
boot -->|loads| uki
uki -->|root hash| store[Verified store]
Inspect firmware enforcement
bootctl status
Look for the Secure Boot state. Use a signed appliance image and firmware with the intended keys enrolled. A signed file alone cannot prove the firmware enforced a signature.
Choose the signing identity
| Build | Keys | Enrollment payloads in /loader/keys/sentinel/ |
|---|---|---|
| Public source build | Development PK, KEK and db; private keys readable in the Nix store. Demonstration identities, not production secrets. | None, only a README, unless a lab sets velstra.appliance.secureBoot.developmentEnrollment. |
| Signed release | Not the development keys. | Installs its own payloads there. |
Warning: The public module does not provide a complete supported production key-custody, rotation and revocation workflow. Do not put production private keys in a derivation, repository, store path or appliance image. Production needs a separately reviewed signing boundary, protected custody, public-key enrollment and a tested revocation/recovery plan.
The OTA signing identity is separate from the firmware identity. The image builders sign the final UKI after its contents are assembled. Preserve firmware recovery access before changing enrolled keys; an OVMF pass with test keys does not qualify production key custody.
Exercise the signed image
nix build .#checks.x86_64-linux.secureboot -L
This fixture enrolls the test keys in OVMF and boots the signed image with enforcement. Verify the store.
Prepare a build host
Use an x86-64 Linux workstation with Nix and flakes. The installed appliance runs without a developer toolchain.
Check the workstation
nix --version
nix flake show --no-write-lock-file
Run the second command from the checked-out Sentinel repository. If flakes are disabled, enable experimental-features = nix-command flakes in the Nix configuration. Initial builds need their pinned sources or a populated cache.
Allow unprivileged user namespaces
The image build runs systemd-repart inside an unprivileged user namespace to assemble the partitions. A host that forbids those namespaces stops the build in the repart step with:
unshare: write failed /proc/self/uid_map: Operation not permitted
Ubuntu 24.04 and later forbid them by default through AppArmor (kernel.apparmor_restrict_unprivileged_userns = 1). Check the host first:
unshare -Ur true && echo "user namespaces available"
sysctl kernel.apparmor_restrict_unprivileged_userns 2>/dev/null
If unshare fails, either allow unprivileged user namespaces on the build host:
echo 'kernel.apparmor_restrict_unprivileged_userns = 0' | sudo tee /etc/sysctl.d/90-nix-userns.conf
sudo sysctl --system
or keep the restriction and give the Nix daemon and its build users an AppArmor profile that permits userns. The sysctl is host-wide, so prefer the profile on a shared machine. Re-run unshare -Ur true to confirm.
Size the build host
Measured on a 16 vCPU / 32 GB builder:
| Item | Size or time |
|---|---|
Cold nix build .#sentinel-image | about 10 minutes |
| Rebuild with cached dependencies | about 8 minutes (the Rust unit tests run inside the build) |
| Appliance closure | about 1.5 GiB; must fit the 2.5 GiB store slot |
| Raw image | about 5.6 GiB apparent (1.7 GiB allocated) |
| Free disk | tens of GiB for the Nix store, and more for the VM checks |
Check VM support
test -w /dev/kvm && echo "KVM available"
KVM is needed for the VM-based checks; image builds alone do not require it. Continue with the VM quickstart or build the installer.
Build an appliance image
Use the raw image for a UEFI virtual disk or as input to the installer. Use the ISO when you want disk selection and first-boot setup.
Build and locate the image
nix build .#sentinel-image --out-link result-image
find -L result-image -name '*.raw' -type f
flowchart LR
src[Source + flake.lock] --> unsigned[sentinel-image-unsigned]
unsigned -->|development keys| signed[sentinel-image]
signed --> vm[UEFI virtual disk]
signed --> seed[seed-image<br/>cloud import]
signed --> iso[sentinel-iso<br/>installer]
The output includes the ESP, a signed kernel image, the verified store, space for the alternate slot, and a writable data partition. nix build .#sentinel-image-unsigned builds the same image before any signature; see compare the unsigned image.
Warning: Source builds sign with per-build development keys that are not a trust identity: their private keys sit in the builder's world-readable Nix store, so do not enroll them in firmware. Release images are re-signed outside the store with the release identity.
Try it in a VM first
nix run .#vm # disposable configuration session
nix build .#checks.x86_64-linux.verified-boot -L # validate the real image and boot chain
Warning:
nix run .#vm(nixosConfigurations.appliance) is a development VM, not an appliance image. It alone logsadminin on the console automatically and has the KNOWN passwordsentinel, so never reuse it for a real box.
The exported modules (nixosModules.sentinel, nixosModules.applianceImage) set no password and no autologin, and the flashable image asserts at build time that it has neither. To install a persistent evaluation appliance, follow the VM quickstart.
Seed a raw image for a cloud import
A raw or QCOW2 import has no administrator, no address and no cloud-init: the first boot reads appliance.toml and the SSH host key from the data partition (GPT name and ext4 label data). Write them into a copy of the image with the pinned seeding tool:
nix run .#seed-image -- --image result-image/velstra-sentinel_1.0.0.raw \
--config my-appliance.toml --output seeded.raw --qcow2 seeded.qcow2
What the tool does:
- Runs this build's own
sentinel config check. - Refuses a configuration with no way in (no read-write login with an SSH key or password hash, SSH disabled, or no interface) unless
--allow-unreachableis given. - Adds the files to the image's factory filesystem as root-owned files (the configuration and private host key mode 0600). It never modifies the input image.
- Prints the generated host key and its fingerprint (pin it in
known_hosts);--host-keyreuses an existing ed25519 key.
The data partition grows to fill the disk on first boot.
Warning: Name only interfaces the machine has: a configured interface that is missing fails boot health. Interface names follow PCI slot order, so a removed or re-ordered NIC moves every later name. Bind each zoned interface with
hw-id = "<mac>"; the tool andsentinel config checkwarn about zoned interfaces bound by name only.
Install to disk
Choose the installer ISO for interactive disk and RAID selection. Installation erases the selected disks. Review the plan before committing. Install to disk.
Build the installation ISO
The ISO is bootable media with the appliance image and installer on board.
Create the ISO
nix build .#sentinel-iso --out-link result-iso
ls -lh result-iso/iso/velstra-sentinel-installer.iso
Attach the ISO to a UEFI VM or prepare installer media. Check disk identities before using a physical target.
Test the installer
nix build .#checks.x86_64-linux.install-iso -L
The fixture boots the ISO and exercises installation. To try a fresh installation interactively, use the VM quickstart.
Build the CLI and dataplane agent
Use the CLI on a workstation to inspect commands and validate configurations. Runtime operations require the appliance services and appropriate privileges.
Build the packaged CLI
nix build .#sentinel --out-link result-cli
./result-cli/bin/sentinel --help
The Nix package wraps external commands with their store paths.
Run the Rust checks
cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --workspace --locked
Run from the repository root on a development host.
Build individual dataplane outputs
nix build .#velstra --out-link result-agent
nix build .#velstra-ebpf --out-link result-ebpf
Fabric and the eBPF compiler inputs are pinned. See Reproduce a build.
Build boundary
The eBPF Rust nightly and LLVM tooling must remain compatible. Review the pinned inputs when changing either. Removing build-time references from a binary is only one closure-reduction step, not proof of a small or toolchain-free appliance: inspect the final runtime closure and image. See reproducibility.
Reproduce a build
Use the same repository revision, lock file and pinned build inputs when comparing appliance artifacts.
Record your inputs
git rev-parse HEAD
nix flake metadata --json --no-write-lock-file > sentinel-flake-metadata.json
The Git revision identifies local build definitions; the lock file identifies external inputs. Keep both with your build record.
Build the pinned image
nix build .#sentinel-image --no-write-lock-file --print-out-paths
Record the resulting store path. The eBPF object also depends on the pinned Rust nightly, build tools and fixed-output hashes. If a dependency changes, review the expected sources before updating hashes.
Build offline
Populate or copy the required store paths and fixed-output sources first. A source checkout alone cannot satisfy network fetches on an air-gapped builder. See the flake outputs.
What pinning does not prove
Pinned inputs improve repeatability; they do not by themselves prove byte-for-byte reproducibility. Compare independently built artifacts, record their hashes and account for signing and other variable inputs.
Compare the unsigned image, not the signed one
nix build .#sentinel-image-unsigned --print-out-paths
Compare and attest the unsigned verity image and its usrhash (the dm-verity root hash on the kernel command line, which binds the whole store partition). The unsigned image carries an unsigned systemd-boot and UKI, so it does not depend on any key.
flowchart LR
rev[Same revision + lock] --> unsigned[Unsigned image<br/>+ usrhash]
unsigned -->|identical across builders| cmp{{Compare and attest}}
unsigned --> dev[sentinel-image<br/>per-builder development keys]
unsigned --> rel[Release image<br/>signed outside the store]
rel -->|check against release certificates| verify{{Verify a release}}
| Artifact | Same across builds? |
|---|---|
nix build .#sentinel-image-unsigned, usrhash | Yes, for the same revision. |
nix build .#sentinel-image, same builder and keys | Signatures reproduce (fixed signing time 2025-01-01 00:00:00 UTC), but a handful of FAT directory-entry timestamp bytes on the ESP differ (measured: 10 bytes). |
nix build .#sentinel-image, different builder | No: each builder has different keys and so different signatures. |
nix build .#sentinel-image signs systemd-boot and the UKI with development PK/KEK/db keys that each builder generates for itself inside a derivation; no enrollment payloads (PK.auth, KEK.auth, db.auth) ship for them unless a lab opts in.
Release images are signed afterwards, outside the store, with the release identity (scripts/community_release.py sign in the release workflow), which replaces every development signature and installs the release's enrollment payloads. To verify a release, compare its usrhash and unsigned payload with your own build, then check the signatures against the published release certificates.
Hashes, toolchain and offline claims
A fixed-output derivation can reuse an older cached object when its expected output hash is unchanged, even if a source revision changed. Verify the measured object and its ABI against the intended userspace cohort before accepting new hashes. Development ABI guards or a fixture's pins are not proof that the published appliance integrates them.
Keep the eBPF Rust nightly and LLVM versions compatible. An offline-build claim requires the complete closure and a successful build with network access disabled, not merely a populated source cache.
Ignore rules are not a secret scan or a history rewrite. Review tracked files, release artifacts and reachable history separately.
Verify the source software inventory
Public CI produces a CycloneDX 1.6 inventory of the declared Rust and JavaScript dependencies, plus checksums and provenance for the source revision.
Verify a CI artifact
sha256sum --check SHA256SUMS
Run this in the extracted sentinel-source-sbom-* artifact. Inspect sbom.cdx.json for components and sbom.provenance.json for source and inventory hashes.
Recreate the inventory
python3 scripts/generate_sbom.py --output-dir /tmp/sentinel-source-sbom
Run from the source checkout with Python 3.11+ and the Syft version pinned by public CI. Choose a fresh output directory.
Review the correct artifact
A source inventory describes declared dependencies, including development packages. For an appliance approval, request release evidence tied to the actual image digest, including the installed-image inventory and its vulnerability scan.
An inventory is not redistribution notices or proof that license and source-distribution obligations are met. See licenses and notices.
Scan the image for known vulnerabilities
The release gate scans the built disk image, not the source tree. It reads slot A's store partition straight from the raw image, so it judges the bytes that ship.
flowchart LR
img[(Raw image)] -->|extract EROFS store| syft[syft catalog]
syft -->|nix_cpe_map.json| cpe[Corrected CPEs]
cpe --> grype[grype]
sys[Image NixOS system] --> vulnix[vulnix -C]
grype --> judge{Subtract nix-patched,<br/>apply waivers}
vulnix --> judge
judge --> verdict[verdict.json<br/>exit 0 / 1 / 2]
Run the gate
Run it on a machine that built the image, so the image's NixOS system and its derivations are in the local Nix store:
nix build .#sentinel-image -o result-image
grype db update
python3 scripts/image_cve_gate.py run \
--image result-image/velstra-sentinel_1.0.0.raw \
--out /tmp/sentinel-cve-scan \
--vulnix "$(nix build --inputs-from . nixpkgs#vulnix --print-out-paths --no-link)/bin/vulnix" \
--fsck-erofs "$(nix build --inputs-from . nixpkgs#erofs-utils.out --print-out-paths --no-link)/bin/fsck.erofs"
You also need syft, grype, nix and sfdisk on PATH. It runs vulnix -C on the image's NixOS system as well and collects the CVE ids that nixpkgs patch files name.
| Exit status | Meaning |
|---|---|
| 0 | Pass. |
| 1 | Fail. |
| 2 | The gate could not judge, for example because a scanner or the system's derivations are missing. |
The output directory keeps every intermediate file and verdict.json; stdout counts open findings per package. image_cve_gate.py evaluate re-judges saved scanner output without rescanning (see its --help).
What fails the gate
| # | Failure | Rule |
|---|---|---|
| 1 | Coverage | A critical package ships, but the SBOM has no CPE that grype can match. The critical packages are the kernel, glibc, openssh, openssl, curl, systemd, sudo, dnsmasq and strongswan. The gate also fails if the package is missing from the SBOM entirely, or if the kernel cataloger found no kernel. "0 CVEs" is not believable for an unmatched package, so the gate never accepts it. |
| 2 | A fixable finding | At or above the threshold (default High), grype knows a fixed version, and the finding is neither patched nor waived. |
| 3 | A vulnix finding at or above the threshold | vulnix is an independent second source with its own name matching. It has no fix data, so a vulnix-only finding blocks until it is fixed, patched or waived. The verdict reports grype-only, vulnix-only and shared findings separately. |
| 4 | An invalid waiver | Expired, missing a field, valid more than 90 days after its review, stale (matches no finding), or a pattern instead of one exact identifier. |
A finding is subtracted as nix-patched only when a patch file of that package's derivation names the CVE, for example nixpkgs' CVE-2026-96512_1.patch for sudo. A grype finding with no known fix is reported as no-fix and does not block.
Waivers
Generate an entry from a verdict instead of typing it:
python3 scripts/image_cve_gate.py waive --verdict /tmp/sentinel-cve-scan/verdict.json \
--cve CVE-2026-12345 --reason "…" --reviewer release-review --days 30
scripts/cve-waivers.json holds the per-CVE decisions:
{"schema": "velstra-cve-waivers/1", "waivers": [
{"id": "CVE-2026-12345", "package": "curl",
"reason": "HTTP/3 is compiled out; the vulnerable code is not in the binary",
"reviewed-by": "release-review", "reviewed": "2026-11-19", "expires": "2026-12-19"}
]}
The entry is valid for at most 90 days, and package limits it to one package. There is no wildcard and no severity-wide or package-wide ignore.
Proposed waivers
A proposal is a committed entry whose reason carries the analysis and whose reviewed-by and reviewed are empty. The gate rejects it ("missing reviewed-by"), so a proposal never passes a release by itself. To accept it, a reviewer checks the analysis against the advisory, fills reviewed-by and reviewed (the review date) and keeps expires within 90 days of it. Replace a waiver with a fix as soon as one ships.
The kernel
NVD's upstream kernel version ranges often omit stable-branch backports, so an unfiltered grype kernel count is an upper bound, not a list of open holes. The gate splits kernel findings in two:
| Kind | Example and remedy |
|---|---|
| Same-branch fix | One of the fixed versions is newer and on the shipped branch, for example 6.12.114 for a 6.12.113 kernel. This blocks like any other fixable finding. The remedy is a newer 6.12 kernel: a nixpkgs bump, or between bumps nix/kernel.nix, which builds the pin's own 6.12 recipe from a newer stable source. |
| Unresolved | No fix is known on the shipped branch in grype's data. Review these against the kernel CNA's per-branch records (vulns.git, cve/published/<year>/<id>.dyad), which often show a stable-branch fix grype does not know. The waiver file then needs a kernel-baseline that names every one of them. |
"kernel-baseline": {"kernel-version": "6.12.118",
"reviewed-cves": {"open-no-branch-fix": ["CVE-2026-23102", "…"],
"no-cna-record": ["CVE-2023-6610", "…"],
"fixed-on-branch": ["CVE-2026-…", "…"],
"not-in-branch": ["CVE-2025-39905", "…"]},
"triage": "vulns.git <commit>: how each group was decided",
"reason": "…", "reviewed-by": "release-review", "reviewed": "2026-11-22", "expires": "2026-12-31"}
The baseline is a reviewed list, not an ignore:
- It names the exact kernel version, so any kernel change forces a new review.
- It expires on the same 90-day rule as a waiver.
- A kernel CVE it does not name fails the gate, and a CVE it names that no finding carries fails it as stale. A new kernel CVE can therefore not slip in under an old review. A count ceiling (
max-unresolved) is refused: it accepted whatever CVEs filled the count.
Use per-CVE waivers for single kernel CVEs that you have checked.
The security floor
checks.image-security-floor proves that the fixes the image claims are the ones it ships. It reads the store paths of the image's system closure (scripts/check_security_floor.py) and fails when:
- a package in
nix/security-floor.jsonships below its floor (the kernel, HAProxy, glibc, gzip, krb5, hostapd, SQLite, libcap, Suricata), or does not ship at all: a floor that matches nothing must be removed; - a
nix/security-backports.nixreplacement did not take (the replaced store path still ships) or is inert (no output by the replacement's name ships); - the
sqlite3shell or libressl'socspcheckis in abin/directory. Their CVEs are in the programs, not in the libraries the image needs.
Backports without a version, Go programs, and bare store hashes
A same-version backport (a CVE patch on GLib, sudo or Net-SNMP) has no version to check; the replacement half of the check covers it, and the patch file name carries the CVE id that the gate's patched step subtracts.
A Go program carries its own copy of the standard library, which no dependency rewrite reaches: the Go programs the image ships (lego, dnsproxy, libcap's captree) are rebuilt with the backported Go toolchain instead.
Upstream system.replaceDependencies rewrites store paths by their full base name. A binary that embeds its own store hash in another form keeps the original path alive, together with whatever that path depends on. GLib does: it builds <glib>/lib/charset.alias from overlapping 16-byte constants, so its .rodata holds <hash>-glib-glib-<version>, and with a replaced glibc the original GLib kept the old glibc in the closure. Sentinel therefore rewrites the bare store hash after the whole base name (nix/replace-direct-dependencies.nix, applied by an overlay; nix/security-backports.nix refuses to evaluate without it). The order matters: a version backport changes the name too, and a hash-only rewrite of <hash>-glibc-2.42-103/lib/ld-linux-x86-64.so.2 names a path that does not exist, and the replacement half of the floor check is what proves that no replaced path survives.
The closure check
nix path-info -r "$(nix eval --raw .#nixosConfigurations.sentinel-image.config.system.build.toplevel)" \
| python3 scripts/check_image_closure.py -
scripts/check_image_closure.py reads one store path per line and fails when the shipped closure contains a build toolchain: gcc or clang (other than their runtime lib/libgcc outputs), binutils, kernel or libc headers, and any -dev output. The 1.0.0 image shipped about 514 MiB of these through rsyslog's MongoDB output.
Why the gate corrects CPEs
Syft names every Nix package cpe:2.3:a:<name>:<name>:<version>, but NVD uses other vendor and product names (gnu:glibc, openbsd:openssh, haxx:curl). scripts/nix_cpe_map.json maps each Nix package name to its NVD vendor and product:
| Key | Purpose |
|---|---|
aliases | Folds variants (systemd-minimal, util-linux-minimal, coreutils-full) onto one package. |
first-party | Lists Velstra's own binaries. Their guessed CPEs only match unrelated products of the same name (the audit's two false "wren" Highs), so the gate drops them. Their Rust dependencies are still scanned from the cargo-auditable data. |
version-rules | Handles Nix-only version suffixes. glibc's 2.42-100 (100 release-branch commits) becomes 2.42, so glibc's branch backports are not credited: check a glibc match against the 2.42 branch before you waive it. openssh 10.5p1 and sudo 1.9.17p2 keep the portable suffix, which grype orders correctly. |
| (kernel) | Never mapped from a Nix name. It must come from syft's linux-kernel cataloger, which reads the version from the bzImage. |
To add a package, add one entry under packages and run the unit tests.
What the generated names missed
With the generated names, grype matched nothing for glibc, openssh, curl, suricata, unbound or python3, so a gate built on them reports a clean image whatever it contains. The 1.0.0 audit measured glibc 0 → 112 and openssh 0 → 40 raw matches once the names were corrected.
Shared with the enterprise pipeline
The enterprise pipeline reads nix_cpe_map.json from the Sentinel source it pins, not its own copy, and checks that schema is velstra-nix-cpe-map/1 first. When the two repositories need different packages, add the entry here.
Third-party notices and source obligations
Warning: Release requirement, not yet a delivered artifact. The current image and bundled console do not contain a complete verified third-party notices bundle. A source SBOM is not a substitute for the licenses and notices required by the actual shipped software. Do not claim this gap is closed by this page.
flowchart LR
inv[Inventory: image closure,<br/>lockfiles, console bundle] --> rec[Reconcile with linked<br/>and embedded components]
rec --> bundle[Notices bundle:<br/>texts, mappings, source access]
bundle --> ship[Read-only image path + console<br/>legal surface: still outstanding]
Required inputs
Inventory inputs for the bundle
Build the inventory from one reviewed release cohort:
- The exact image's Nix store closure, including kernel, bootloader, firmware, services and dynamically linked libraries.
- The Cargo lockfiles and source trees used for Sentinel, Fabric, Wren and the eBPF object. A host-only dependency tree can omit target-specific or embedded components.
- The locked npm tree and actual console bundle. Build-time dependencies are useful audit inputs, but do not assume every development dependency is shipped or that every bundled asset has an npm package record.
- Vendored source, generated protocol code, patches and copied static assets.
Use the installed SBOM and build provenance as inventory inputs, then reconcile them with actual linked/embedded components. Package metadata alone may omit copyrights, dual-license choices, additional NOTICE files and source obligations.
Bundle acceptance
Per-component records, required contents and delivery
For every distributed component, record its name, exact version/source revision, source URL, selected license expression, and hashes of the source license/notice files. Copy those files from the reviewed source; do not synthesize copyright holders or replace missing terms with a guessed SPDX label. Unknown/conflicting licenses, missing mandatory texts and incompatible terms must fail release review.
The bundle must retain:
- Full applicable license texts and upstream copyright/NOTICE material.
- Component-to-text mappings, including the software embedded in the console and eBPF object.
- The corresponding-source availability required by each applicable license, including modifications and build/install information where required.
- The image SHA-256, source/input revisions and bundle hash in the release evidence. Keep the inventory deterministic and check for unaccounted files.
Before distributing, install the validated bundle in a documented read-only image path, expose it from the console's legal/about surface, and publish the matching source access information alongside the artifacts. Test access as an ordinary operator on the built image and verify the bundle's hash after extraction. Those image/UI delivery hooks and their regression tests are still outstanding.
Licences of the first-party components
The image combines three first-party projects, each under its own licence, with NixOS packages under theirs:
| Component | What ships in the image | Licence |
|---|---|---|
| Sentinel | the sentinel CLI, API and embedded console | AGPL-3.0-or-later |
| Fabric | the velstra data-plane agent | AGPL-3.0-or-later |
Fabric eBPF object (velstra-ebpf) | the XDP/TC programs loaded into the kernel | GPL-2.0-or-later OR MIT |
| Wren | the wren routing daemon | GPL-2.0-or-later (its wren-core crate is Apache-2.0) |
| NixOS packages | kernel, systemd, OpenSSH, strongSwan, dnsmasq and the rest of the closure | each package's own licence, as recorded in its nixpkgs meta.license |
The Rust crates compiled into the three binaries were checked at the 8b6181 audit and carry only permissive licences; no SSPL, BUSL, GPL-2.0-only or unknown licence was found in the shipped dependency graphs.
What a distributor must ship
Anyone who distributes the image, including a derived or commercial edition, distributes all of the above and must meet each licence's terms. At least:
- The licence texts of every component, including the AGPL-3.0, GPL-2.0, MIT, Apache-2.0 texts for the first-party components and the texts for the NixOS packages in the closure.
- The corresponding source of every GPL- or AGPL-licensed component, or a
written offer for it. For the first-party components that is the exact
revisions pinned in
flake.lock(Sentinel itself,fabricandwren). For NixOS packages it is the nixpkgs revision inflake.locktogether with every patch or override applied on top of it — the patch files in this repository and any patches a derived edition adds (for example a security overlay). - The build and install information the licences require, which for this image is the flake and its lock file.
- Because Sentinel and Fabric are AGPL, users who interact with a modified version over a network must be offered its corresponding source.
Open legal question (needs counsel)
This page states licence facts, not legal advice. One question is unresolved and
needs a lawyer before a proprietary edition ships: whether a proprietary
edition's additions constitute mere aggregation with Wren (GPL-2.0-or-later) and
with Fabric and Sentinel (AGPL-3.0-or-later), and whether any contributor
agreement covers relicensing Wren's GPL code. Wren and the agent run as
separate executables, which supports the aggregation reading, but that has been
checked only at the Nix packaging level, not by code review. Fabric commit
0012f81 removed CLA enforcement and relicensing claims from that project, so
relicensing rights should not be assumed.
Sentinel's own terms are in LICENSE and CONTRIBUTING.md. No separate CLA is administered. These documents neither establish ownership of third-party contributions nor grant additional commercial relicensing rights; resolve rights questions with the actual rights holders before relying on them.
Dataplane support and conformance
Sentinel retains Fabric's stateful eBPF firewall. This page states what the 1.0.0 data plane (the Fabric commit pinned in flake.lock) is qualified to do and where it stops. A passing parser, host unit test or verifier load is not a passing packet test, so every claim names the VM check that exercises it on the shipped object.
flowchart LR
rx[NIC receive] --> xdp[XDP ingress<br/>filtering]
xdp -->|drop| drop[Dropped]
xdp -->|pass| fib[Kernel routing]
fib --> tc[TC egress<br/>egress policy, source NAT]
tc --> tx[NIC transmit]
Sentinel 1.0.0
| Claim | Checks | What they prove |
|---|---|---|
| Connections | nat-capacity-pressure, nat-pressure-reference | The gate opens 20,000 masqueraded connections and requires every one to answer a later held-connection probe; the reference runs the same load through netfilter as the oracle. Not a hardware throughput or connections-per-second figure; see Conntrack capacity below. |
| Differential conformance | dataplane-conformance, firewall-policy-conformance, tcp-reset-validation | Sentinel compared with netfilter on identical topologies, fragmented UDP and echo through SNAT included; policy matching across families; out-of-window, inexact and checksum-corrupt resets leave live connections alone. |
| Verifier | ebpf-verifier-6-6, -6-12, -6-18 | Every shipped program loads on 6.6, 6.12 and 6.18 and on the CI runner's 7.0 kernel, from one object. |
| Restart and reconfigure | agent-restart-persist, agent-reconfigure-stall | Keeps enforcing and keeps NAT state across an agent restart; bounds the traffic gate of a commit on a 120,000-entry blocklist. |
Current boundaries
| Path | Status in 1.0.0 |
|---|---|
| Routed IPv4/IPv6 filtering | XDP ingress plus kernel routing and TC egress. Allowed traffic is not generally kernel-bypassed. |
| Stateful TCP/UDP | Sequence-aware RST validation; XMAS, NULL, FIN-only and out-of-state packets dropped on stateful zones; TCP and UDP with IPv4 options refused on stateful zones. IPv6 and data-carrying RSTs are not checksum-verified; HA-imported state has no sequence window yet. |
| IPv4 source NAT and destination NAT | Masquerade, static SNAT, DNAT, hairpin (client port rewritten) and load balancing pass their VM checks, with HA conntrack sync. GRE, ESP, SCTP and 6in4 are masqueraded; AH, ICMP timestamp and ICMP with options are dropped at WAN egress. |
| Fragmented IPv4 through NAT | Translated. Non-first fragments that arrive before the first are dropped; later fragments of a port-forward reply on a masqueraded WAN are refused. |
| ICMP errors related to flows | Delivered for tracked flows, IPv6 packet-too-big included (path-MTU discovery works). ICMPv6 errors about connections behind NPTv6, or quoting extension headers, reach the host (v6-mss-npt-related). |
| IPv6 | Filtering and routed forwarding; NPTv6 and NAT64 have their own checks. IPv6 SYNs are MSS-clamped like IPv4. IPv6 fragments are not NAT-translated; for the SYN proxy see below. |
| Conntrack capacity | Sized from the box's memory, floor 16,384 connections; a reclaimer frees expired state. The 20,000-connection gate is a VM regression bound, not a supported hardware limit. |
| Blocklist and GeoIP | Name sources only: they refuse what a listed address sends in, and the answers to connections the inside opened towards it pass (blocklist-direction). There is no outbound blocklist. The global blocklist is copied into each zone policy; config check refuses it past 262,144 entries in total, and there is no bulk removal command. |
| SYN proxy | IPv4 only in 1.0; IPv6 SYNs to a protected port are not proxied, and config check names the zones where that applies (planned for 1.1). Scoped to the zones that admit the port (see the firewall handbook). Proxied connections lose window scaling, SACK and timestamps. |
| Masquerade ports | About 31,000 concurrent connections to one remote ip:port per public address; a new connection examines a fixed 128-port window and is refused, counted in egress_nat_no_candidate, when it finds none (nat-cps). |
| Rule capacity | 8,192 rule-trie entries per address family, refused at config check and commit. |
| VLANs on native XDP | A NIC that strips 802.1Q tags in hardware (rx-vlan-offload: ixgbe, i40e, ice, igc and others) hands native XDP on the parent an untagged frame, which the parent's zone then judges before the VLAN interface's own. Not reproducible on virtio. Until the data plane reads the stripped tag, turn the offload off on such a parent (set interface <parent> offload rxvlan false). |
| XDP redirects | Fabric has explicit IPv4 FIB, load-balancer and overlay redirect paths. Those do not establish an established-flow fast path for the Sentinel router/NAT configuration. |
| Generic/SKB XDP | Driver fallback, not native-XDP performance. Native mode and each NIC driver require separate qualification. |
| HA | Experimental. The ha-*, conntracksync and vrrp checks cover witness and two-node election, failover with state, masquerade and SYN proxy failover; that is not clearance for every partition or witness-loss case. Rolling upgrades across a policy-digest change are not hitless (see the 1.0.0 release notes). |
| Kernel compatibility | 6.12 is the appliance kernel. 6.6 / 6.12 / 6.18 checks load the same object on real guest kernels. |
An unsupported case is an open bug, not a silent success: the differential gate has no xfail list. No Mpps-per-core figures exist for a Sentinel established-flow redirect path.
Run the oracle comparison
Build workstation: Linux, Nix with flakes, writable /dev/kvm.
Warning: Never run these on an installed appliance or production interfaces.
python3 -B -m unittest discover -s nix/conformance -v
nix build .#checks.x86_64-linux.dataplane-conformance -L --out-link result-conformance
cat result-conformance/conformance.json
flowchart LR
subgraph Sentinel lane
l1[LAN endpoint] --> dut[Sentinel] --> w1[WAN endpoint]
end
subgraph Reference lane
l2[LAN endpoint] --> ref[nftables] --> w2[WAN endpoint]
end
w1 --> cmp{{Compare receipts}}
w2 --> cmp
The six-VM topology uses separate LAN/WAN segments for nftables and Sentinel. Both have identical addresses, policies, payloads, MTUs and kernel versions.
- The endpoints use native sockets, not Fabric's parser.
- A peer reports the actual source address and payload digest; TCP also verifies the returned payload.
- The test independently validates the oracle's expected result before comparing Sentinel.
- A failure on both sides is a setup/oracle error, not a pass.
| Inventory | Cases |
|---|---|
| Covered (17) | IPv4 TCP/UDP masquerade, four-MiB bidirectional TCP, fragmented UDP, echo and fragmented echo, RELATED ICMP port-unreachable, IPv6 TCP/UDP forwarding, TCP/UDP DNAT, unsolicited IPv4/IPv6 drop, IPv4/IPv6 TCP reset, and a 1280-byte egress-MTU fault |
| Not yet covered | Overlapping/out-of-order fragments, every TCP state, NAT exhaustion, malformed packets, full IPv6 extension-header cases |
On a rejected Nix build, inspect nix log for CONFORMANCE_RECEIPT; a failed derivation is not a registered release artifact.
What a receipt contains
Receipts include kernel versions, object/config hashes, nftables rules and counters, observed payloads and the complete comparison. Packet captures remain in the VM test driver's output.
14 November checkpoint
The 14 November targeted checkpoint passes 15 of these 17 cases, with the netfilter reference independently meeting all 17 expectations. Fragmented UDP SNAT and fragmented echo SNAT still fail, so the whole gate remains red. The comparator validates both probes' expectations against its own case inventory; matching packet loss or matching rewritten expectations cannot count as success.
Run the kernel matrix
nix build --keep-going -L \
.#checks.x86_64-linux.ebpf-verifier-6-6 \
.#checks.x86_64-linux.ebpf-verifier-6-12 \
.#checks.x86_64-linux.ebpf-verifier-6-18
Every lane loads all shipped entry points into the guest's kernel verifier and records the actual uname -r, object SHA-256 and individual programs. CI runs each lane independently on PRs and nightly and keeps failed-load logs; no rejected kernel is silently replaced with 6.12 or marked as an expected pass.
Earlier verifier receipts and RELATED-ICMP results
The 14 November working-source checkpoint loads all 21 entry points on 6.6.159, 6.12.113 and 6.18.57 with the same ELF SHA-256:
2af0a7e7c0d7fe66a3be34fb705147aa19c4aa3df3a62adb726b2aba64e1d411
That receipt qualifies only this object on those guest kernels. It does not
qualify a different locked Fabric revision, a final image, NIC drivers or
packet behavior. A subsequent hairpin repair, ELF SHA-256
18e8bfe667fb117d7684143d478440f184e04b01f97a302e671b06868582a860, also passes
all three kernel checks. It passes 18 targeted ICMP cases on each of ordinary
SNAT, DNAT and hairpin, plus five policy controls. The full differential gate
still fails: the reference forwards two malformed error variants that Sentinel
rejects on all three paths. A subsequent test-only extension also proves
rejection after deleting the exact physical flow state, on the wrong ingress
interface with reverse-path filtering disabled, and after idle expiry: 62/62
Sentinel cases pass. Those checks prove actual injection and no state refresh;
they do not turn the six reference discrepancies into passes. General RELATED
qualification remains open.
Fragment NAT and redirect performance remain open as well.
The endpoint follow-up also reads the real UDP error queue (IP_RECVERR), not
only packet captures. Linux delivers the bad quoted IPv4 checksum and unassigned
Time Exceeded code 2 to the application on all three NAT paths; Sentinel drops
both. These six differences remain failures. Keeping the stricter checksum
check versus matching Linux requires an explicit compatibility decision:
RFC 5508 section 4.1
recommends dropping an invalid embedded IPv4 checksum. That recommendation does
not settle unknown ICMP-code handling. No exception has been approved.
Those 14 November RELATED discrepancies are historical. The 17 November candidate passes the expanded strict UDP-quote comparison: 145 observations across 19 reports, including opaque error codes, deliberately invalid quoted checksums, wrong ingress, missing physical state and idle expiry. A stale XOR stimulus was first rejected because it injected different checksum errors into the two lanes; the reviewed constant-error stimulus then passes without relaxing the comparator. This supersedes the targeted UDP-quote discrepancy, not general PMTU, TCP quotes or fragmented NAT. No exception or final-image qualification is implied.
A later loader-only rollback repair is separately qualified with object SHA-256
af9bc39c35f0d231621402efb3869f63c4e0904909b0c6fb7d5730428680d736 on the same
three kernels. Its live address-change test proves that a failed configuration
apply cannot reopen stale maps after an intervening address change. The same
race test fails against the previous loader. This source-stamped object has its
own verifier receipts; older packet results are not a final-image certificate.
NAT failure diagnostics
On builds containing the NAT diagnostics change, sentinel show firewall statistics
reports two additional packet-attempt counters:
| Counter | Meaning |
|---|---|
egress_nat_no_candidate | The bounded NAT candidate search found no claimable/reusable binding. This can happen with an almost empty map; it does not mean the map is full. |
egress_nat_claim_failed | A new binding could not be reserved because the map helper returned an error other than a competing insertion. This alone does not identify a capacity failure. |
- They are reasons within
egress_dropped, not additional drops to sum into it. - Retransmissions count again, so they are not counts of failed connections.
- Reads across counters/CPUs are not atomic; counters restart with the agent.
- Missing counters on an older image do not mean zero failures.
- They repair none of the collision/admission, ownership-reclamation or established state-retention limitations, and are not evidence of final-image qualification.
Established-flow redirect acceptance
A router fast path must not be implemented by simply enabling Fabric's existing FIB redirect: that bypasses TC egress, including egress policy and source NAT.
Acceptance criteria for a fast path and for performance figures
Before enabling one, require all of the following:
- Only fully admitted established flows; policy-generation and HA lease checks on both ingress and selected egress, with immediate revocation on changes.
- Correct SNAT/DNAT in both directions, neighbour/FIB refresh, TTL/checksum, MTU/ICMP handling and a safe kernel fallback for unsupported packets.
- No bypass of shaping, PBR/VRF, IPsec, raw-IP tunnels or other egress services. Ineligible flows stay on the classified kernel/TC path, not an unchecked path.
- Differential traffic tests run with fast path both on and off, including policy replacement, route withdrawal and an established-flow HA failover.
- Packet counters prove redirect, not
XDP_PASS; an independent receiver verifies payload, loss and bidirectional state.
Performance publication then needs dedicated, disclosed hardware, native-XDP driver, exact source/object/kernel hashes, packet sizes, pinned cores/queues, warmup and repeated measurements. Compare identical policies against nftables both without and with flowtables; report loss, latency and the sustained packet rate per actual dataplane core. Shared QEMU timings are regression evidence, not hardware Mpps benchmarks.
History before 1.0.0
Measurements on earlier candidates (historical evidence, not current status)
The measurements in this section were taken on earlier candidates. They record how the limits above were found and are kept as evidence, not as the current status.
Source checkpoint, 18–19 November 2026
- Not release-ready: the full pressure gate opens all 20,000 connections, but only 16,322 pass the held-connection probe. NAT bindings remain present while firewall state is missing. A safe supported connection limit has not been established.
- Still failing: wrong-sequence, nonexact in-window and checksum-corrupt TCP resets destroy live state; fragmented IPv4 UDP/ICMP SNAT fails against the independent netfilter reference.
- Passing within scope: plain NAT, hairpin, generated reject packets, pairing/config-sync with and without a witness, and same-source/historical mixed-source single-flow failover. These do not qualify a complete rolling upgrade, loaded failover or signed image.
- Verifier: all 22 shipped programs load on 6.6.159, 6.12.113 and 6.18.57
from the same object, SHA-256
a2d2ef90c895df56bb6a049535222f0186bedaa0fbd56ae919991189aaf53c47.
The remediation record separates source cohorts, fixed test fixtures, actual runtime fixes and failures. Earlier measurements below remain historical evidence, not extra guarantees.
A separate working-source fragment containment regression now proves that unsupported nonlocal fragments on the Sentinel TC masquerade path are refused rather than leaking an untranslated source. This is not fragmented NAT support: fragmented routed replies on that masquerade uplink are also conservatively refused. Non-masquerade links are outside this guard. The full differential gate remains mandatory and red for fragmented NAT.
The independent baseline concurrency run retained 16,261 working connections from 20,000 attempts. That remains an unresolved capacity finding, not a universal NAT-map limit: ordinary masquerade uses one NAT entry, DNAT uses two, and firewall tracking consumes additional entries in its separate map. The active-state count excludes expired records and is not a map-occupancy or eviction-pressure metric.
The 17 November instrumented rerun passes through 16,000 and fails at 17,000/20,000. At 20,000 attempts, 19,992 connections initially echo but only 16,320 pass the later probe; missing firewall state correlates with loss while their NAT bindings remain owned. This is not a supported connection-limit claim or final-image qualification.
A later same-day candidate rerun also reproduces loss below that pressure boundary: 12,000 initial connections pass, but only 3,253 later echoes are verified despite recorded established state. At 20k, none matches the required probe round; this includes delayed/wrong-round responses as well as timeouts and must not be described as zero packet delivery. The root cause of the early loss is unresolved; a 16k connection limit is not qualified by the earlier run.
The 17 November standalone allocator now passes that unchanged nine-flow workload with nine initial and held echoes, nine unique public ports and zero NAT failure counters. All 21 programs load on all three verifier kernels. This complete-domain search is not enabled with HA or conntrack synchronization, and its extra lookup cost is not yet performance-qualified. It does not fix publication, collection or LRU loss.
Its full pressure rerun remains red:928 of the first12,000 requests were not attempted before the unchanged45-second opening deadline. At20,000 requested, 19,072 connections initially worked but only16,321 later echoes passed; missing firewall state accompanied2,753 ownership failures while NAT bindings remained owned. Do not advertise a supported connection limit or relax the deadline based on the sparse-collision fix.
The 16 November candidate reproduced the nine-flow admission failure with only 8 of 65,536 reverse-map entries occupied. Atomic reservation prevents that claim path from replacing a foreign owner; it does not make the allocator complete or remove expiry, cleanup and LRU races. ICMP echo ownership passes six targeted packet cases on the same candidate, not a full concurrent allocation-race gate.
The 17 November expiry correction passes eleven targeted packet cases, including reuse of an expired DNAT tuple and canonical router-state lookup despite an expired tenant entry. Expired lookup no longer deletes NAT state. This is not garbage collection: retained expired reservations, generic paired publication and LRU loss remain separate ownership/admission problems. The exact outlined object passes all three kernel verifiers; this does not certify a final release image.
nat-capacity-pressure tests the held-connection requirement separately from
occupancy telemetry. It runs real client/masquerade/backend traffic with unique
echo payloads and retains raw maps and per-flow failures before rejecting a
run. A 64-flow smoke pass is not 20,000-flow qualification. The test does not
alter capacity, insert synthetic state or waive known connection loss.
Choose a flake output
Build from an x86-64 Linux checkout. The command determines whether you get an executable, boot media or a VM test.
Packages
| Goal | Output |
|---|---|
| Run the CLI | nix build .#sentinel |
| Build the immutable disk image | nix build .#sentinel-image |
| Build installation media | nix build .#sentinel-iso |
| Obtain OVMF for a UEFI VM | nix build .#qemu-firmware |
| Build the web frontend | nix build .#sentinel-ui |
| Build the image before signing | nix build .#sentinel-image-unsigned |
| Build Fabric, the eBPF object or Wren | .#velstra, .#velstra-ebpf, .#wren |
Run a VM or inspect outputs
nix run .#vm # development appliance VM
nix run .#seed-image -- --help # seed a raw image for a cloud import
# From the build host, list the outputs of your checkout:
nix flake show --no-write-lock-file
The VM app boots a development appliance. A disk image is a package and does not contain a VM launcher. The NixOS configurations and modules are listed separately by the flake.
Select a check
nix build .#checks.x86_64-linux.quickstart -L
Use the test catalog to select an image, protocol, management or recovery test. VM checks require KVM.
Evidence boundaries
Query the current attributes instead of relying on a frozen package or test count:
nix eval --json .#packages.x86_64-linux --apply builtins.attrNames
nix eval --json .#checks.x86_64-linux --apply builtins.attrNames
Warning: Public image builds use development signing identities. A public package or module is not an Enterprise QCOW2/sysupdate certification. The
vmapplication is a development VM, not necessarily a boot of the exact release disk. Evaluate, build and boot-test the intended artifact and dependency cohort separately.
Select a verification test
# from the repository root
nix eval --json .#checks.x86_64-linux --apply builtins.attrNames # list the current checks
nix build .#checks.x86_64-linux.quickstart -L # run one VM check
flowchart LR
src[Source checks<br/>cargo, npm] --> eval[Flake evaluation<br/>no VM runs]
eval --> vm[VM check<br/>needs KVM]
vm --> all[Full check set]
all -.->|does not replace| final[Acceptance + SBOM/CVE<br/>of the final signed image]
The flake, not a count copied here, defines the suite, including fixtures whose wiring and pins are still being integrated. A fixture file or standalone receipt does not mean the published package exposes it or uses the tested cohort; a configured check is not a passing test or release certificate.
Source checks
cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --workspace --locked
# React console
npm --prefix ui ci
npm --prefix ui test
npm --prefix ui run build
tests/console/run.sh
The browser runner needs Node.js and Chromium and uses a temporary loopback API with --no-apply: it covers browser interactions and configuration writes, not the network, a deployed firewall, live packets or HA. See the browser test instructions.
List and evaluate the current Nix checks
nix eval --json .#checks.x86_64-linux --apply builtins.attrNames # names from the current flake
nix flake check --no-build --no-write-lock-file # evaluates only: runs no VM test, proves no image boots
Run a real VM check
Needs x86_64 Linux, usable /dev/kvm and enough RAM for the topology:
nix build .#checks.x86_64-linux.quickstart -L
nix build .#checks.x86_64-linux.nat -L
nix build .#checks.x86_64-linux.bootfallback -L
nix flake check -L # everything: builds images and runs many multi-VM topologies
Allow substantial disk, memory and time; save logs and output paths before removing artifacts.
Warning: A failure, timeout, interrupted check or unexecuted check is not a pass.
| Area | Check names | Scope |
|---|---|---|
| Image and installation | verified-boot, secureboot, install, install-iso, install-boot, install-boot-luks, install-boot-raid1 | Boot integrity, installer and installed-image regressions; Secure Boot uses test keys. |
| Update and recovery | update, updatechannel, update-release, bootfallback, boothealth, missing-nic-boot, reboot | Slot staging, signed release handling, boot assessment, missing-NIC factory exhaustion and console recovery. Read each fixture's scope before interpreting its result. |
| Active configuration | commit, commitconfirm, confirm-crash, confirm-failed-recovery, cli-edge, confighistory, refresh-running, api | Apply/save, actual CLI termination, failed recovery admission and explicit retry, offline editing, invalid batches/addresses/durations, stale-session admission and management reads. |
| Authentication lifecycle | loginlifecycle, radius-interop, auth-bounds | SSH/PAM account removal, stable identities, persistent TOTP replay, real FreeRADIUS PAP, source-bound HTTPS login limits and actual viewer/admin write authorization. |
| Management ingress | management-ingress | Real IPv4/IPv6 SSH and HTTPS across interfaces; explicit destination ACLs block LAN access while management and same-port forwarded traffic remain available, including after reboot. Binding an address alone is not ingress isolation. |
| Signed metadata | update-release | Actual packaged CLI and disposable Ed25519 proofs: image-version floor, signed scope/expiry, replay and sequence substitution, cold-boot persistence, clock rollback and corrupt/missing trust-state refusal. The crypto fixture is deliberately not bootable and proves no slot write. |
| Packet handling | nat, hairpin, masq, reject, rejectudp, egress, rulescope, v6exthdr | Real traffic through the data plane. A NAT pass does not establish fragment or RELATED-ICMP support. |
| Netfilter comparison | dataplane-conformance, icmp-related, tcp-reset-validation | Matched traffic and policies against an independent nftables reference. The reset check compares socket continuity and firewall state after foreign-tuple, out-of-window, in-window nonexact, checksum-corrupt and valid resets; includes pre-guest wire captures and native challenge-ACK counters. Known differences fail CI; see conformance scope. |
| Firewall map occupancy | firewall-capacity | Real kernel occupancy versus independent bpftool counts, expired-slot warnings, authenticated HTTP/CLI parity and missing-agent/restart handling. This is not a connection-limit or eviction-pressure benchmark. |
| Held NAT connection pressure | nat-capacity-pressure, nat-capacity-contract | Three disposable VMs hold nonce-verified TCP flows up to 20,000; fresh map identities and hash-checked raw snapshots correlate each flow with its NAT/firewall ownership. Lost flows or missing state fail, not an expected-bug pass. Pure probe contracts are separate from the live gate. |
| Kernel fragment mechanics | kernel-fragment-egress-{6-6,6-12,6-18}, kernel-fragment-combined-{6-6,6-12,6-18} | Isolated reassembly/refragmentation and ingress-domain isolation on three real kernels. These do not execute Sentinel NAT, policy or HA and cannot clear a failing product differential. |
| TCX fragment dispatch | kernel-fragment-tcx-{6-6,6-12,6-18} | Actual pinned-Aya attachment and legacy-chain dispatch; deliberately reproduces bypass from PASS and stale readiness after chain loss. Passing hazard controls are not production loader safety or NAT qualification. |
| Guarded ingress handoff | kernel-fragment-handoff-{6-6,6-12,6-18} | Reserved-flow reassembly, one-use bounded tickets and original ingress routing context; chain deletion and ticket exhaustion must drop. Does not execute Sentinel NAT/policy or solve ordinary unfragmented admission. |
| Immutable update admission during recovery | ota-confirmation | Real EFI/verity boot and transient confirmation/recovery units, including actual partial restore failure. CLI/API Check must be refused before jobs/network traffic; exact retry restores availability. Uses disposable test identities, not production keys; does not certify Stage/CAS. |
| Boot and console write admission | confirm-special-entrypoints, confirm-boot-journal, confirm-boot-late | Failed recovery and live HTTPS transactions block replay; automatic console/network refresh preserves active intent. Includes actual CAKE bandwidth and reboot recovery, not every subsystem or a shared CLI/API journal. |
| Periodic firewall recovery admission | confirm-refresh | Real failed rollback and queued recovery cannot replay trial policy over a restored firewall. Fresh TCP traffic and compiled/intent state are checked; normal, armed CLI and ready HTTPS trials retain legitimate refresh. |
| Confirmation diagnostics | confirm-diagnostics | Missing timers are silent, genuine stop failures remain visible, and a refused cancellation cannot confirm a live trial. Checks actual PID-1 protection and unchanged intent. |
| Local read-only observation | observe-readonly | Six exact SSH/sudo capabilities, protected data redaction, live BGP/NAT and API parity, privilege denials, account revocation and honest daemon failure. Not unrestricted CLI access. |
| API observation error privacy | api-show-disclosure | Actual packaged binary and loopback HTTP: malformed private history cannot leak unknown historical secrets to account users or narrowed machine requests. Retains HTTP errors and valid-read redaction. |
| Routing | bgp, bgp-static-reload, ospf, ospfinterop, bfd, vrrp, staticimport | Adjacencies, preserved BGP sockets during static-route edits, a third-party OSPFv2 peer and route recovery; not comprehensive protocol certification. |
| HA and synchronization | ha-pair, ha-two-node, ha-failover, ha-two-node-flow, configsync | Pairing, policy/state synchronization and selected failure cases. HA remains experimental. |
| Nonpreempting HA rejoin | ha-rejoin, ha-rejoin-contract | Five disposable VMs with a continuously healthy witness and clean config-sync outboxes. Continuous existing/fresh TCP traffic, real VIP SNAT and incumbent role/deadline/NAT observations span the returning member's entire boot. Hard-failover losses are recorded separately; this is not witness-loss, queued-policy replay or final-image certification. |
| Browser | console, console-ux | Browser interactions against a test API; complements the live packet checks. |
| Compiler/agent boundary | contract | Compiled configuration is accepted by the pinned Fabric loader. |
Other protocol checks are development coverage, not support for every option, peer or failure mode (routing status, dataplane support).
Release evidence
Record per release check: exact Git revisions, input lockfile, eBPF object hash, image SHA-256, command, result and retained output. The evidence classes above are not interchangeable; never reuse a result from another source cohort.
ci-public.yml shows which checks run on a PR; the scheduled dependency audit does not run the VM suite.
Kernel verifier compatibility
Host Rust tests cannot verify eBPF; the exact object must load into each target kernel in a privileged VM, and an unexecuted lane is not support (dataplane matrix).
Additional fixture catalog
Jump to: Boot · Config · Firewall · NAT · Routing · L2 · Addressing · WAN · VPN · Services
A task lookup, not a passing-results ledger; the fixture source is authoritative. Rendering, adjacency and replication checks alone do not prove service interoperability or failover; experimental-feature limits apply.
Image & boot integrity
| Check | Intended fixture scope |
|---|---|
verified-boot | dm-verity store mounts, the UKI boots, a clean boot is blessed |
secureboot | boots under enforcing Secure Boot |
install | single-disk and RAID1 installs check partition and filesystem layout; actual installed-disk boot needs the install-boot fixtures |
install-iso | installer ISO structure and bundled-image installation; not a substitute for booting the installed disk |
update | an A/B update writes + re-types slot B; a counted next-boot entry is selected |
updatechannel | the crypto gate in front of the slot writer rejects an unsigned update |
reboot | a genuine machine.reboot() brings the whole running config back, not just the files |
Config lifecycle & management
| Check | Intended fixture scope |
|---|---|
commit | commit applies hostname/zone/address live; save persists across reboot |
commitconfirm | a timed commit auto-reverts unless confirmed — the safety net for editing a firewall over its own link |
confighistory | every save archives a revision, show system commit lists them, rollback <N> restores one |
configsync | a commit on the primary pushes the running config to the backup's API, which applies and persists it |
api | CLI/API management operations against the appliance backend. |
console | Browser validation of management operations, staged changes and their outcomes. |
contract | the compiled agent config keeps the shape the data plane reads |
shipped | what the image actually carries |
wizard | the installer's click-through, answered end to end |
Firewall (eBPF data plane)
| Check | Intended fixture scope |
|---|---|
reject | a rejected TCP port answers with a RST, not a silent drop |
rejectudp | a rejected UDP port answers with ICMP port-unreachable |
log | per-rule logging fires for a logged drop and a logged pass, and stays quiet otherwise |
srcfilter | a rule's source CIDR matches the intended client and only that one |
nat | Packet translations and stateful reverse-path handling. |
fwgroups | address and port groups expand at compile time to the full sources × ports product |
fwdomain | Resolves domain-group membership for firewall matching. |
fwschedule | a rule with a weekly schedule is in the data plane only inside its window |
v6exthdr | IPv6 extension headers do not bypass a rule — the chain is walked to the real protocol |
icmptype | Matches ICMP and ICMPv6 rules by message type. |
rulescope | Scopes rules by ingress interface within a zone. |
evpn | Exchanges tenant reachability across peer routing sessions. |
macgroup | Selects configured groups of link-layer addresses. |
egress | Applies the policy in the intended egress direction. |
srcprefix | every source-prefix length matches, not just the convenient ones |
v6rules | a rule scoped to IPv6 lands in its own trie and does not open the v4 one |
blocklist-direction | a zone blocklist refuses what a listed address starts, both families, while the LAN still reaches it and gets its answers |
NAT
| Check | Intended fixture scope |
|---|---|
nat | Packet translations and stateful reverse-path handling. |
synproxy | Exercises the configured SYN proxy with a real connection, and that a LAN client's outbound SYN to the protected port is not proxied, and a server that speaks first answers through the proxy. |
synproxy-edge | SYN proxy on a deny-by-default masquerading edge box: a port-forward that remaps its port, servers that speak first (routed and port-forwarded), and syn-protect surviving save, an unrelated commit and a reboot |
synproxy-churn | SYN-proxy records end with their connections: idle routed and port-changing-forward connections survive more short ones (FIN and reset closes) than the table holds, the table drains, and blind forged SYN, FIN and reset packets end no live connection |
masq | masquerade SNATs a private LAN client out of the WAN address |
hairpin | an internal client reaches a port-forwarded service via the box's own public IP |
npt66 | stateless, checksum-neutral IPv6 prefix translation (RFC 6296) |
v6-mss-npt-related | an IPv6 SYN is MSS-clamped like IPv4; a Packet Too Big behind NPTv6, or quoting an extension header, reaches the inside host's socket; the inside host's port-unreachable names its external address |
nat64 | an IPv6-only client reaches an IPv4-only server through the box, DNS64 included |
conntracksync | checks replicated conntrack state; use the causal HA flow fixtures to prove actual connection continuity |
Routing (Wren control plane)
| Check | Intended fixture scope |
|---|---|
bgp | two appliances peer eBGP and each learns the other's network |
policy | a VyOS-style route-map filters and rewrites what BGP exports |
ospf | an OSPFv2 point-to-point adjacency; each side learns the other's redistributed network |
ospf3 | the same over IPv6 (OSPFv3, RFC 5340) |
rip | RIPv2 — a distance-vector paradigm alongside BGP's path-vector and OSPF's link-state |
ripng | RIPng (RFC 2080), the IPv6 sibling |
babel | Babel (RFC 8966) over IPv6 |
isis | IS-IS (ISO 10589 + RFC 1195) — a link-state IGP running directly over L2 |
isisauth | Verifies IS-IS authentication between neighbors. |
bfd | BFD (RFC 5880) under BGP detects a path failure fast |
vrrp | two boxes share a virtual IP; the higher priority owns it and hands it over on loss |
staticv6 | static routes are dual-stack — a v6 prefix reaches the kernel IPv6 FIB |
multiwan | health-checked uplink failover plus policy routing across two upstreams |
routingimport | Checks route import policy against received prefixes. |
ospfinterop | Establishes an OSPF adjacency with the test peer and checks exchanged routes. |
Interfaces & L2
| Check | Intended fixture scope |
|---|---|
l2 | a bridge and a bond, synthesised on the same networkd render path as VLANs |
c14 | MACVLAN and QinQ, the two remaining networkd-rendered L2 types |
macsec | 802.1AE link encryption comes up from a pre-shared key |
l2tp | a static L2TPv3 Ethernet pseudowire over the underlay |
tunnel | kernel GRE tunnels between two appliances |
linkopts | per-interface MTU (jumbo frames / PPPoE) and MAC cloning reach the link |
linkbehaviour | per-link forwarding, ARP and DHCP-client identity reach the kernel, and a mirror carries traffic |
vti | Brings up a route-based IPsec/VTI path. |
wireless | Verifies wireless configuration rendering; test radio behavior with actual hardware. |
wwan | Verifies modem configuration rendering; carrier and hardware behavior require a modem. |
dualstack | one interface carries an independent static IPv4 and IPv6 address |
Address & name services
| Check | Intended fixture scope |
|---|---|
dhcp | the built-in DHCP server leases to a LAN client |
dhcp6 | stateful DHCPv6 leases — the stateful sibling of ra |
ra | IPv6 Router Advertisements give a client a SLAAC address |
dhcp6pd | DHCPv6-PD requests a delegated prefix upstream (the German-ISP WAN v6 model) |
dhcprelay | Exercises DHCP relay across client and server segments. |
dhcprelay6 | the IPv6 sibling of the relay |
dns | the DNS forwarder resolves for the LAN against an authoritative upstream |
ntp | the box serves time to the LAN from an upstream source |
mdns | the mDNS reflector bridges discovery between two segments |
dyndns | the dyndns2 client updates a provider when the WAN address changes |
WAN & shaping
| Check | Intended fixture scope |
|---|---|
pppoe | a PPPoE session against a real concentrator, plus MSS clamping |
qos | a CAKE shaper is live in the kernel at the configured bandwidth |
VPN
| Check | Intended fixture scope |
|---|---|
wireguard | a WireGuard interface and tunnel render to a Kind=wireguard netdev with a 0640 key |
ipsec | an IKEv2 site-to-site tunnel establishes and carries traffic between protected subnets |
openconnect | a road-warrior client dials in and reaches a host behind the box |
Services
| Check | Intended fixture scope |
|---|---|
ssh | set services ssh tunes the daemon; set system login creates real accounts and keys |
snmp | a read-only v2c poll answers, and the rendered config stays 0640 |
lldp | LLDP neighbours are discovered between two boxes (the daemon is off by default) |
pki | a local CA and a leaf signed by it land under /var/lib/sentinel/pki with the right modes |
reverseproxy | TLS terminates on :443 with an on-box leaf and load-balances to a backend |
geoip | Checks country-prefix policy using the test database. |
acme | Issues and installs a certificate in the test environment. |
bcastrelay | Relays the selected UDP broadcast service across configured interfaces. |
syslog | Delivers appliance log records to a remote collector. |
alerts | Delivers a notification when a monitored unit fails. |
spoofing | Compares accepted and rejected sources under source-validation modes. |
ids | Observes the configured detector emitting an event for test traffic. |
portal | Tests guest admission and expiry against the dataplane. |
portmap | Verifies a client mapping against the agent’s live NAT-PMP table. |
Console test reference
These suites launch real Chromium against a real Sentinel API. The API uses a
throwaway TOML document, a loopback listener and --no-apply: no workstation
networking, physical firewall or production configuration is changed. Node and
Chromium are build/test dependencies, never appliance runtime dependencies.
Run a focused suite
From the repository root:
cargo build --locked
CONSOLE_TEST_FILE=layout.test.mjs tests/console/run.sh target/debug/sentinel
Password helper
Account tests create and check real password hashes with an external mkpasswd.
The appliance's Nix wrapper pins it through SENTINEL_MKPASSWD_BIN; a
cargo-built binary has no pin. run.sh therefore uses, in order: an exported
SENTINEL_MKPASSWD_BIN, the pin inside a Nix-wrapped binary, or the mkpasswd
on PATH (resolved to an absolute path). It probes the helper for yescrypt and
stops with exit status 2 if there is none or it cannot produce yescrypt, rather
than letting every account test fail with "no hash was stored". The pinned
helper, which also verifies imported $1$, $5$ and $6$ hashes, is:
nix build .#password-hasher --out-link result-password-hasher
export SENTINEL_MKPASSWD_BIN=$PWD/result-password-hasher/bin/mkpasswd
A distribution mkpasswd (Debian/Ubuntu whois) works for the suites but may
lack the legacy schemes; use the pinned one when testing imported hashes.
Browser profiles
Each browser gets a throwaway /tmp/sentinel-console-* profile. The harness
removes it once the browser's whole process group has exited (SIGTERM, then
SIGKILL after CONSOLE_CLOSE_GRACE_MS, default 5000), and removes any profile
still registered when the process exits — including after a failed test, a
failed launch, or SIGINT/SIGTERM/SIGHUP. Leftover sentinel-console-*
directories are no longer expected; one that appears is a harness bug. The
cleanup itself has a browser-free unit test:
node --test tests/console/harness-cleanup.unit.mjs
Run the frontend gate
Select the suites below for the change being verified:
cargo build
(
for suite in ux layout console react health ha-mode peer archive; do
CONSOLE_TEST_FILE="$suite.test.mjs" tests/console/run.sh target/debug/sentinel || exit 1
done
)
For a single suite, omit the loop. Set CONSOLE_PORT if the default loopback
port 18099 is already occupied. Never run two suites against the same listener
or mutable configuration. The runner copies the binary for each API process so
a concurrent rebuild cannot change the executable underneath a running test.
| Suite | Scope |
|---|---|
ux | Switch cancellation/keyboard activation; suggestion disclosure; invalid/valid numbers and URLs; rule port ranges; retryable diagnostics; identifier labels; shared alignment and HA mobile copy |
layout | Every palette destination at 1440, 390 and 320 px; associated input labels; overlapping grid fields; clipped controls outside intentional scroll regions; no document overflow |
console | Navigation/tabs, create panels, staged changes, persistence/defaults, authentication/permissions, dialog flows, secrets; includes the strict Stage contract below and a separate grammar-field exposure inventory |
workflow | Change dock (fixed, never occluding, review with masked credentials, one Apply), actionable empty lists, rule columns and filter, interface link column, setting search and its catalogue freshness, page index, first-steps list; 1440 and 390 px. Runs inside ux; standalone execution is available for focused diagnosis |
stage-contract | Explicit form/value cases: actual controls and physical Stage clicks, strict real API and installed CLI validation, unchanged-value feedback and invalid inputs. Runs inside console; standalone execution is available for focused diagnosis |
update-url | Shared default/Add/Edit channel URL policy: invalid schemes, HTTPS/offline mirrors, keyboard Stage, associated error and focus recovery at 1440/390/320 px. Runs inside ux; standalone execution is available for diagnosis |
react | Dashboard/flows/editor, safe apply/confirm/expiry, drafts, mobile navigation, both themes and sensitive-state cleanup |
health | Real health API; explicitly synthetic clock/TPM/failure cases; retry and NTP navigation |
ha-mode | Election controls, risk guidance, canonical staging, invalid timing and narrow themes; does not enroll a cluster |
peer | Two disposable APIs with real pinned HTTPS, member observations, read-only peer write gates/local draft preservation, late renders, pin mismatch and session isolation; actual Refresh/sign-out lifecycle with explicitly synthetic delivery-state/delay fixtures, not native config-sync certification |
archive | Actual CLI/UI saves and revision rollbacks, invalid Validate without a write, on-disk private modes and preserved credentials; the separate archive-privacy VM gate proves UID isolation and live OS behavior |
Optional evidence output:
CONSOLE_TEST_FILE=layout.test.mjs \
CONSOLE_SCREENSHOTS=/absolute/path/to/owned-evidence \
tests/console/run.sh
The layout JSON includes network responses and browser logs as well as JS exceptions. Failed operational probes are not healthy measurements. A development machine without the appliance's Wren/systemd/dataplane services may legitimately return HTTP errors for those reads; the console must show unavailable status and retain diagnostic details. Negative authentication/validation tests deliberately produce refusal responses. Do not label those runs "zero HTTP errors", suppress the evidence, or infer hardware/HA/data-plane certification from frontend tests.
The setting search reads src/settings-index.json. After adding, renaming or
moving a console field, regenerate it from the masks the console builds and
rebuild, otherwise the workflow freshness test fails:
CONSOLE_TEST_FILE=settings-index.mjs tests/console/run.sh target/debug/sentinel
cargo build
Also run the production asset and code checks:
npm run format:check --prefix ui
npm run typecheck --prefix ui
npm test --prefix ui
npm run build --prefix ui
npm run check:assets --prefix ui
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test --workspace
Original OS proposal
The original design explored an image-based NixOS appliance and separated the operating system from mutable configuration. The current architecture describes the shipped storage layout and boot flow.
Read the current architecture. For the complete historical discussion, see the archived proposal.
Original commit proposal
The original proposal rebuilt a NixOS generation on each configuration change. The implemented CLI compiles the candidate and applies it to running services.
Read the current architecture. For the complete historical discussion, see the archived proposal.