PortGate

Blueprints · Server Hardening

Production 10 min · Linux

Unused filesystem modules

Stages a modprobe block for filesystem types a VPS does not mount. It does not unload modules that are already in use.

Baked-in protections

Step 1 · conf

modprobe config

/root/portgate-blueprints/unused-fs.conf

Copy it to /etc/modprobe.d after you confirm those filesystems are unused.

install cramfs /bin/true
install freevxfs /bin/true
install jffs2 /bin/true
install hfs /bin/true
install hfsplus /bin/true
install udf /bin/true

Step 2 · bash

Read-only check

/root/portgate-blueprints/fs-check.sh

Prints status. It does not change the service.

#!/bin/sh
set -eu
lsmod | grep -E 'cramfs|udf|hfs' || echo "Those filesystem modules are not currently loaded."