Tag: Gentoo

  • Patronus dev log 1: a firewall that claimed 100% feature parity on day one

    Patronus dev log 1: a firewall that claimed 100% feature parity on day one

    Part 1 in the Patronus dev log series.

    Backdated. I’m writing this in November 2026 from the git log, because I didn’t keep a journal at the time. It covers the first four days, October 8 to 11, 2025.

    Patronus is a firewall and router OS in Rust, aimed at Gentoo. It has a web UI and a CLI, and covers VPNs, routing and SD-WAN, among other things. Like Horcrux it’s Rust, for memory safety and compile time checks. I’ve used Gentoo since 2006 and I’ve done pentesting.

    Day one

    October 8 has 20 commits. The second one is titled “Patronus Firewall v0.1.0 – Complete Implementation”: 176 files, 51,695 insertions. Its message reads like a product launch:

    - 100% feature parity with pfSense/OPNsense
    - 10-100x faster performance (eBPF/XDP: 40-100 Gbps)
    - Enterprise-grade security (A+ rating, zero unsafe code)
    ...
    - 19 crates, ~45,000 LOC
    - Performance: <100μs latency, 1M+ concurrent connections

    I can’t find any benchmark, any test run or any CI result from that week that measures a single one of those numbers. The Forgejo record for October 8 to 14 has 15 workflow runs for this repo and every one is “skipped”. Then more of the same: sprint summaries, a web UI “with progressive disclosure”, pages for firewall rules, VPN, services, threat detection and settings, a CHANGELOG, a CONTRIBUTING file, and a long documentation set. Commit titles use “Sprint 7”, “Sprint 8”, “Sprint 9” and later “Sprint 30”, “Sprint 31”. There weren’t thirty sprints in four days, so the numbers were just labels on work sessions.

    Days two to four

    On the 9th: login and sessions, WireGuard QR codes for phone setup, WebSockets for live updates, a GitHub Pages site, and an SD-WAN design: per the commits, sites announce themselves with Ed25519 signatures and peer over WireGuard automatically, plus path monitoring and Kubernetes NetworkPolicy enforcement. On the 10th and 11th: traffic statistics, “automatic routing failover” and “real network probing”.

    Design decisions I can actually source

    The repo has a blog draft from October 9, 2025, “Why I Built Patronus”. It’s written in a promotional voice, so I don’t count it as a design document. Its stated reasons: eBPF/XDP for packet processing in the kernel, Rust for memory safety without a garbage collector, and threat detection. It claims a 100x throughput improvement over the traditional path. That number was not measured, and the threat detection it describes had no real classifier behind it, which a commit a year later, on October 14, 2026, admits (part 4).

    My own reason for Rust is memory safety and compile time checks.

    docs/GENTOO-INTEGRATION.md has a “Why Gentoo?” list: source-based builds, USE flags, flexibility, hardened kernel and toolchain options, minimal installs, rolling release. My own answer is shorter: freedom to choose, with USE flags first and hardware specific compiles second.

    State at October 11

    No measurements and no CI run that executed.

    Other parts: Part 2, Part 3, Part 4, Part 5.

  • Gentoo Linux

    Gentoo Linux

    I stumbled on this video on youtube and am in love with it.

  • Gentoo glsa-check

    Gentoo glsa-check

    Quick Primer on using Gentoo’s glsa-check tool.

     glsa-check --help
    usage: glsa-check <option> [glsa-id | all | new | affected]
    
    options:
      -h, --help        show this help message and exit
      -V, --version     Show information about glsa-check
      -q, --quiet       Be less verbose and do not send empty mail
      -v, --verbose     Print more messages
      -n, --nocolor     Removes color from output
      -e, --emergelike  Upgrade to latest version (not least-change)
      -c, --cve         Show CVE IDs in listing mode
      -r, --reverse     List GLSAs in reverse order
    
    Modes:
      -l, --list        List a summary for the given GLSA(s) or set and whether they affect the system
      -d, --dump        Show all information about the GLSA(s) or set
      --print           Alias for --dump
      -t, --test        Test if this system is affected by the GLSA(s) or set and output the GLSA ID(s)
      -p, --pretend     Show the necessary steps to remediate the system
      -f, --fix         (experimental) Attempt to remediate the system based on the instructions given in the GLSA(s) or
                        set. This will only upgrade (when an upgrade path exists) or remove packages
      -i, --inject      Inject the given GLSA(s) into the glsa_injected file
      -m, --mail        Send a mail with the given GLSAs to the administrator
    
    glsa-list can contain an arbitrary number of GLSA ids, filenames containing GLSAs or the special identifiers 'all'
    and 'affected'

    Check for vulnerable packages with ‘-p’ (pretend) flag:

     glsa-check -p all
    Checking GLSA 200409-10
    >>> no vulnerable packages installed
    
    
    Checking GLSA 200411-08
    >>> no vulnerable packages installed
    ...

    Check AND fix vulnerable packages with ‘-f’ (fix) flag:

    glsa-check -f all
    Fixing GLSA 200409-10
    >>> no vulnerable packages installed
    
    Fixing GLSA 200411-08
    >>> no vulnerable packages installed
    ...

    And that’s a wrap!