sensr

GitHub

A firewall and router OS written in Rust, built on NixOS. It aims to match OPNsense feature for feature, with atomic upgrades and rollback.

Early, in development. Releases v0.1.0 to v0.1.24 are published on GitHub with Pi 4 and Pi 5 images, an x86 ISO and a qcow2, and the author’s home router is a Pi 5 running sensr. Images are built and boot-tested by CI; a download button that is still dimmed has no asset in the latest release yet. sensr is young; for a mature option see OPNsense for Raspberry Pi or VyOS for Raspberry Pi.

Boot-tested in a VM

x86_64 PC / appliance

  • UEFI USB installer, writes to an internal disk
  • Intel, Realtek and Mellanox NICs from the mainline kernel
  • AES-NI, so VPNs are fast
Download installer ISO
ISO image · sha256
Runs on a real Pi 5

Raspberry Pi 5

  • Onboard RP1 Ethernet with the mainline driver, no out-of-tree modules
  • RTL8156 2.5 GbE and RTL8157 5 GbE USB NICs
  • SD, USB and NVMe boot, straight from the Pi firmware with the mainline kernel (no UEFI), D0 boards (2 GB/16 GB) included
  • 2 GB RAM minimum, 4 GB or more for Suricata and large blocklists
  • Try it from Raspberry Pi OS first: a one-time trial boot that falls back to your OS by itself
Download for Pi 5
image · sha256
Runs on a real Pi 4

Raspberry Pi 4

  • Onboard genet Ethernet as WAN, USB NICs for LAN
  • USB 3 NICs (RTL8153 / RTL8156 / AX88179), loaded by the mainline kernel
  • 2 GB RAM minimum, 4 GB recommended for IDS and large blocklists
  • No AES hardware, so VPNs are CPU-bound
Download for Pi 4
image · sha256
qemu-guest profile

Virtual machine

  • qcow2 for Proxmox, libvirt and QEMU
  • virtio NICs
  • The same image the CI tests boot
Download qcow2
image · sha256

Startup on a real Pi 5: time until traffic flows

Real Pi 5 (16 GB), from the reboot commandopnsense-pivyos-pisensr (development build, ran on a Pi 5)
Kernel starts36–38 s23–24 s≈19 s (derived)
Traffic flowing (network up)64–67 s~60 s≈34 s
SSH / UI ready65–68 s
web GUI
82 s
SSH
43 s
SSH; UI assets not packaged yet
Fully ready81–85 s~85 s≈66 s

Timed from the reboot command, so shutdown, the Pi firmware and the boot loader come first (the "kernel starts" row): OPNsense boots through UEFI, VyOS straight from the Pi firmware. "Traffic flowing" is the LAN port up with an address; "fully ready" is OPNsense's last boot script or VyOS's config loaded. OPNsense from its own boot logs over 7 typical reboots (1 s resolution). The VyOS column is the router this site's author runs: pi5-1 (Pi 5, 16 GB, NVMe, three NICs, ntopng and AdGuard containers), measured 2026-11-18 over two reboots with an external ping/SSH watcher (≈1 s resolution) plus the router's own journal (short-monotonic) – LAN up 59.6 s, SSH 81.7 and 82.0 s, config loaded 85 s. That live configuration is what makes it slower than the 14 s/47–49 s figures measured on the same board with a minimal default config, which are in the Pi 5 comparison, boot time. VyOS has no web UI, so its figure is SSH.

The sensr column is the development trial on pi5-1 (16 GB, D0, three NICs) carrying an imported home-router config – Kea DHCP, Unbound, Suricata and 18 nftables chains – measured 2026-11-18. On the box: kernel 0.6 s, initrd 4.7 s, userspace 41.9 s, multi-user at 28.4 s, the LAN carrier 14.9 s and SSH listening 24.0 s after kernel start, and 43 s from the reboot command to SSH by wall clock. The kernel/traffic/ready rows above are that 43 s less the kernel-to-SSH interval, so they carry about a second of uncertainty; "fully ready" is the last unit (Suricata's signature update, 23.7 s) at 47.3 s after kernel start. The web UI's HTML is served, but its CSS, JS and wasm are not packaged in the build yet, so "UI ready" is SSH plus those pages.

x86 VM (relative only, not the Pi)
x86 VM, from VM startOPNsenseVyOSsensr
Traffic flowing14.5 s
17.7 s with 1k rules
30.7 s
120.6 s with 1k rules
8.6 s
home-router.xml imported at first boot; 8.6 s with the factory config
UI/API ready15.4 s
19.4 s with 1k rules
39.4 s
>10 min with 1k rules
8.6 s
sensr-api; SSH 9.2 s

OPNsense and VyOS from the sensr benchmark: median of 5 boots from virsh start, virtio, boot loader delays as shipped; "1k rules" is 1,000 rules plus a 10k-entry table. sensr from its own boot benchmark (nix/bench/boot-times.py) with the same definitions: x86 qcow2 under KVM, median of 5 (5 of 5 succeeded), from QEMU start including OVMF (systemd-boot shows no menu unless a key is held); traffic flowing is a LAN client pinging the WAN host through NAT every 50 ms. The host was shared with other VMs (load 6–9) during these runs. These show relative start-up cost on fast hardware, not Pi 5 times.

Image size

Pi 5 download (.img.xz)Pi 4 downloadInstalled on disk*
opnsense-pi (release 26.7-4)1.32 GB1.32 GB~2.1 GiB (2,104 MiB)
vyos-pi (release 2026.11.16-2)599 MB562 MB~0.7 GiB (732 MiB squashfs)
sensr (release latest)see release (.img.zst; 2.1 GB raw)see release (.img.zst)~0.85 GiB (870 MiB x86 closure)

Downloads: the latest GitHub releases (this page updates the sizes from GitHub when it loads). *Installed: measured on x86 VMs in the sensr benchmark (OPNsense 26.7, VyOS rolling), not on the Pi images. The sensr row is measured on its development builds: the Pi 5 image as CI builds it (zstd), and the closure of the x86 qcow2 image (no Perl, no nixpkgs source, Kea without its Python shell).

Throughput on a real Pi 5

Measured on the development trial: pi5-1 (16 GB, D0, three NICs) with the imported home-router config and Suricata, on a 1 Gb/s AT&T line, 2026-11-18.

TestResultLimit
LAN, TCP 4 streams, into the router940 Mbit/sthe Mac's 1 GbE port; 0 retransmits
LAN, TCP 4 streams, out of the router932 Mbit/sthe same 1 GbE ceiling; 41 retransmits
Forwarded LAN → WAN, upload436 Mbit/sthe line's upstream (the router alone got 456)
Forwarded LAN → WAN, download≈717 Mbit/sHTTP, 86 MB/s; public iperf3 servers refused the reverse run
WAN from the router, download≈730 Mbit/sHTTP, 91 MB/s; 456 Mbit/s up on iperf3
Latency to 8.8.8.88.0 ms0% loss over 3 pings

The LAN figures measure the client's 1 GbE port, not the router: both directions ran at line rate, and the 2.5 GbE ports were not tested for lack of a second 2.5 GbE peer. The forwarded runs went from another LAN host through NAT and the firewall to a public server, so they include the AT&T line. The Mac was not used for those: its default route is a phone hotspot.

Ceiling of the hardware, for reference; not yet measured with 5 GbE dongles.

LinkCeiling
Onboard Ethernet1 Gbit/s
Each blue USB 3.0 port5 Gbit/s signalling (USB 3.x Gen 1, 8b/10b coding), so at most 4 Gbit/s of data. A 5 GbE RTL8157 dongle can link at 5 Gbit/s, but on a PC's Gen 1 port it moved 3.47 Gbit/s in iperf3 (4.70 on Gen 2). Expect about 3.5 Gbit/s per port. Each port has its own USB controller in the RP1 chip.
RP1 ↔ SoCPCIe 2.0 x4, about 16 Gbit/s each way, shared by both USB ports and the onboard Ethernet. It is not the limit with two dongles.
Driversensr uses Linux, as vyos-pi does. Mainline r8152 drives the RTL8157 from Linux 7.1. sensr's Pi 5 image runs nixpkgs' mainline linux_latest (7.3 today), which has it, so no vendor kernel or backport is needed.
Through the routerThe lowest of the WAN port, the LAN port and what the CPU can forward. The firewall rules, NAT and Suricata set the real figure. Measured so far.

One-liner (Linux)

Writes the Pi 5 image straight to a disk. Replace /dev/sdX; everything on it is erased. For a Pi 4, use the same line with sensr-pi4.img.zst instead.

curl -fL https://github.com/itpick/sensr/releases/latest/download/sensr-pi5.img.zst | zstd -dc | sudo dd of=/dev/sdX bs=4M conv=fsync status=progress

Or, in Raspberry Pi Imager, choose Use custom and select the downloaded image.

First-boot settings

The FAT boot partition has a sensr/ folder, which works like the opnsense-pi/ folder in opnsense-pi. Put files there on any computer before the first boot. The last column says what the current development image already does with each one.

FileEffectToday
config.jsonA full sensr config (a backup export), applied once and then renamed to config.json.applied.Planned
seed.tomlA short hand-written seed: hostname, admin password hash or SSH keys, which NIC is LAN and WAN (by MAC), WAN type. Merged over the defaults, then renamed .applied.Planned
config.xmlAn OPNsense backup, converted to sensr config on first boot and applied.Yes: imported once onto a box with no config yet; the import report is kept on the box (/var/lib/sensr/import-report.txt). The interface names it uses must exist; until ifnames works, rename FreeBSD names such as igc0 to the Linux ones first.
ifnames<mac> <name> lines that pin NIC names, so USB adapters can't swap LAN and WAN.Planned
authorized_keysSSH keys for the admin account. SSH is key-only and never reachable from the WAN.Yes: keys for root
reboot-after-minutesA number N. A safety net for remote installs: sensr reboots N minutes after every boot until you delete the file; on a Pi 5 trial boot that brings back the system you had. Config changes made with sensr config commit --confirm roll back by themselves unless confirmed.Yes

sensr also writes to the folder: README.txt (this list) and, on the Pi, boot-log/ with one file per boot stage (early, running, shutdown, and the initrd's journal when it gives up), so a box that never reaches the network still leaves a post-mortem.

First boot

  1. Pi: update the EEPROM bootloader first (Raspberry Pi OS: sudo rpi-eeprom-update -a).
  2. Without a seed, the first NIC (eth0) is WAN (DHCP) and the second (eth1) is LAN with 192.168.1.1/24. Plug your computer into LAN.
  3. Planned: open https://192.168.1.1 and finish the setup wizard, which makes you set an admin password. Today the UI answers HTTPS on port 443 with a self-signed certificate and the setup wizard does not exist yet.

Updates

The installed system updates from these releases: System › Updates in the web UI checks update-manifest.json, verifies the closure's sha256 against it, imports it and switches to it atomically. The previous generation stays in the system profile and the boot menu. Automatic installs are off until you turn them on there.

Build it yourself

git clone https://github.com/itpick/sensr && cd sensr && nix build .#images.pi5