infra-modulejaillisted
Install: claude install-skill bitranox/bitranox-skills
# infra-modulejail
## Overview
Reduce a host's kernel attack surface by blocking every module except a proven-needed
set ("jailing" the module namespace). The danger is not the blocking, it is bricking a
host you cannot reach. This skill is the safe procedure.
**Core principles:**
1. **Allowlist, then block the complement.** Do NOT hand-pick a short blocklist of
"obviously unused" modules (gpu, sound, bluetooth) - that barely dents the surface.
Build the KEEP set, then block everything else. A real jail blocks the large majority
of the tree.
2. **Keep the block RUNTIME-ONLY. Never bake it into the initramfs.** This is what makes
a mistake survivable (see "Why runtime-only").
3. **Prove three invariants against a dry-run before you apply**, and validate the gate
against a known-negative.
4. **A host with no console/OOB power is not hardened until a real reboot proved it while
you could still recover it.**
## When to use / not
Use when: locking down a server, appliance, hypervisor (Proxmox/KVM host), or an
about-to-relocate box; responding to a `request_module()`/autoload CVE class (obscure
network protocols - `dccp`, `sctp`, `rds`, `tipc` - or filesystems autoloaded on mount).
Do NOT use on a machine whose exact hardware/workload you cannot enumerate and reboot-test
first, or where you have no way to recover a bad boot (no console, no OOB power, no on-site
hands) - fix the recovery path first.
## The safe method
### 1. Build the KEEP set, then its de