Skip to content

docs(sensor): keep fenrir's capture NIC silent while it boots - #1553

Merged
Gerrrt merged 3 commits into
mainfrom
docs/sensor-silence-ens19-at-boot
Nov 17, 2026
Merged

Gerrrt merged 3 commits into
mainfrom
docs/sensor-silence-ens19-at-boot

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

What changed

build-the-sensor-guest.md §3 gets a new step, Keep ens19 silent while it boots, too:

  • /etc/dracut.conf.d/10-homelab-no-network.conf leaves networking out of the initramfs. Its line is the same one dracut's own no-network profile uses.
  • /etc/sysctl.d/60-capture-nic.conf sets net.ipv6.conf.ens19.disable_ipv6 = 1.
  • The step first copies the running kernel's image as a fallback. update-initramfs -u -k "$(uname -r)" then rebuilds it, and lsinitrd -m checks that same image to confirm networking is gone.
  • The step gives a way back through the console if the new image doesn't boot.
  • The proof is a capture on tap190i1 across a reboot, plus tx_packets reading 0.

The PR also adds a 2026-11-17 changelog entry. It corrects the 2026-10-01 entry's account of the nine packets ens19 sends at boot. This PR changes docs only. The step has not been applied on fenrir yet.

Why

This is finding 8 of the 2026-11-13 audit of fenrir. The NIC is meant to listen and never speak, yet it had sent 9 packets since boot. On 2026-11-17, a capture on tap190i1 from Saruman during a reboot found 9 frames again, in two windows:

  • In the initramfs (about 3–6 s). Dracut's catch-all zzzz-dracut-default.network sent a DHCPv4 Discover carrying the MAC and the hostname fenrir, plus IPv6 duplicate-address detection and multicast listener reports. It also took a pool lease for ens18 (10.0.30.116) before the static .90 applied.
  • After switch-root (about 9.5 s). networkd brought the link up and the kernel briefly added an IPv6 link-local address, which sent three more listener reports. Then netplan's link-local: [] removed the address.

The root disk is local, so the initramfs needs no network. Per-interface sysctls are applied by udev (99-systemd.rules) as the interface appears, which is before networkd brings it up.

Blast radius

Docs only. Once applied, fenrir's initramfs has no networking and ens19 has no IPv6.

  • The capture itself is unaffected: Zeek reads raw frames in promiscuous mode.

  • ens18 keeps its static address from netplan in the real system.

  • The risk is an image that doesn't boot. The step copies the running kernel's image first. The way back is to boot that copy from GRUB, through VM 190's console in the Proxmox web UI. The VM has no serial port, so qm terminal can't be used.

  • No change to network segmentation or firewall rules

  • No new port published to a VLAN that could not already reach the service

  • No credential added outside secrets/*.sops.yaml

Verification

  • On fenrir, after the 2026-11-17 reboot (read-only):

    • The journal shows ens19: Configuring with /run/systemd/network/zzzz-dracut-default.network at 3.4 s, and ens18: DHCPv4 address 10.0.30.116/24 at 3.44 s.
    • At 9.53 s it shows ens19: Gained IPv6LL, then Lost IPv6LL at 9.61 s.
    • tx_packets is 9.
    • /usr/lib/dracut/dracut.conf.d/no-network/10-no-network.conf holds the omit_dracutmodules line used here.
  • On Saruman, tcpdump -Q in on tap190i1 across the reboot captured the 9 frames described above.

  • python3 scripts/check_docs.py passes ("docs OK — 164 Prometheus + 21 Loki rules, 8 dashboards, 156 panels, 14 assertions").

  • ./scripts/lint.sh passes, with 4 checks skipped and so not run: yamllint, ruff ×2 and ansible-lint, because pipx is not on fenrir. CI runs them.

  • scripts/check_close_keywords.py on this body: passes.

  • make validate was not run. This is a docs-only change, so per CLAUDE.md the two checks above are the minimum.

  • Not checked: whether the other 26.04 lab guests also take an ens18 pool lease at boot.

  • make validate passes

  • Deployed to the lab and confirmed working. Not yet: the step still has to be applied on fenrir, then a reboot under capture must show 0 frames.

  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

A capture on tap190i1 across a reboot found the nine frames ens19 sends
at every boot: a DHCPv4 Discover with the MAC and hostname, IPv6 DAD and
MLD reports from dracut's zzzz-dracut-default.network in the initramfs,
and three more MLD reports after switch-root before netplan's
link-local: [] applies. Runbook §3 now omits networking from the
initramfs (dracut's own no-network line) and sets disable_ipv6 on ens19
through sysctl.d, with the capture and tx_packets at 0 as the proof.
The changelog entry corrects the 2026-10-01 account of those packets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:13
@Gerrrt
Gerrrt enabled auto-merge (squash) November 17, 2026 22:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The runbook may validate the wrong kernel’s initramfs and relies on recovery options that may be unavailable: a previous bootable kernel and a configured serial console.

3 open issues
What changed in this PR

This docs-only PR adds boot-time hardening instructions for fenrir’s capture NIC so it remains receive-only before netplan takes effect. The procedure has not yet been applied on fenrir.

Changes:

  • Document disabling initramfs networking and IPv6 on ens19.
  • Add image inspection, console recovery, and reboot-capture verification steps.
  • Record the observed boot traffic and correct the earlier changelog explanation.
File Description
docs/​runbooks/​build-the-sensor-guest.md Adds boot-silencing configuration, recovery guidance, and verification steps.
docs/​changelog.md Records the boot-traffic findings and corrects the 2026-10-01 account.

Review effort: Balanced

Comment thread docs/runbooks/build-the-sensor-guest.md Resolved
Comment thread docs/runbooks/build-the-sensor-guest.md Resolved
Comment thread docs/runbooks/build-the-sensor-guest.md Resolved
Gerrrt and others added 2 commits November 17, 2026 22:21
Review on #1553. Rebuild and inspect the running kernel's image by
version, after a pending reboot, so the image checked is the one that
boots. Copy that image first and boot the copy from GRUB if the new one
fails, which needs no second kernel. Recovery goes through VM 190's web
console: the VM has no serial port, so qm terminal cannot reach GRUB.
The sshd step's fallback said qm terminal too, and now says the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nsor-silence-ens19-at-boot-fix

# Conflicts:
#	docs/changelog.md
@Gerrrt
Gerrrt disabled auto-merge November 17, 2026 22:51
@Gerrrt
Gerrrt merged commit 68ec209 into main Nov 17, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the docs/sensor-silence-ens19-at-boot branch November 17, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants