This guide describes the layered security enhancements included with geckoforge. The workflow covers SSH hardening during first boot, a default-deny firewall with trusted LAN access, encrypted DNS with ProtonVPN CLI integration, automatic security updates, and sandboxed Flatpak deployments for high-risk applications.
profile/scripts/firstboot-ssh-hardening.sh runs during
initial boot to apply production SSH policies:
- Moves the daemon to port 223 with ed25519 and RSA host keys
- Restricts cryptography to Curve25519 key exchange, AES-256-GCM, and ChaCha20
- Disables password authentication and reduces login grace/attempts
- Enables VERBOSE logging for auditing
- Installs an enhanced legal banner at
/etc/issue.net
After installation, connect with:
ssh -p 223 <user>@<hostname>
Run the user setup scripts as needed:
./scripts/setup-secure-firewall.sh
- Enforces a drop-by-default policy via firewalld
- Creates
geckoforge-trustedzone for RFC1918 networks (10/8, 172.16/12, 192.168/16) - Allows SSH (port 223), KDE Connect, and mDNS only inside trusted networks
- Prompts to bind specific interfaces to the trusted zone
./scripts/setup-secure-dns.sh
- Configures systemd-resolved with Quad9 DNS-over-TLS and DNSSEC
- Re-links
/etc/resolv.confto the systemd stub resolver - Installs ProtonVPN CLI if available via zypper or prints repository instructions
./scripts/setup-auto-updates.sh
- Creates
geckoforge-security-updates.serviceand timer for daily security patches - Randomizes execution within a 60-minute window to avoid predictable traffic
- Logs activity to
journalctl -u geckoforge-security-updates.service
Enable the security module in home/home.nix:
geckoforge.security.enable = true;The module performs the following on home-manager switch:
- Installs
bubblewrap,dnsutils, andrkhunter - Ensures Flatpak availability and installs:
org.mozilla.firefoxorg.chromium.Chromiumorg.libreoffice.LibreOffice
- Applies strict overrides:
- Removes access to the home directory
- Grants read/write access to
~/Downloads(and~/Documentsfor LibreOffice)
- Drops wrapper scripts (
~/.local/bin/firefox,chromium,libreoffice) that exec the Flatpak builds - Installs Firefox enterprise policies with preloaded security extensions (uBlock Origin, HTTPS Everywhere, ClearURLs) and disables password storage
sshd -T | grep -E "port|ciphers|kexalgorithms"shows the hardened settingsfirewall-cmd --get-default-zonereturnsdropresolvectl statusreports Quad9 with DNSOverTLS=yessystemctl list-timers geckoforge-security-updates.timerdisplays the scheduleflatpak info org.mozilla.firefoxconfirms the sandboxed browsers are present
- Cannot reach SSH: Confirm firewall trusted zone contains your subnet and that you are connecting on port 223.
- DNS override skipped: Verify
systemd-resolvedis enabled; some server setups use NetworkManager DNS management which may need alignment. - ProtonVPN package missing: Add Proton's repository per script output or follow the latest instructions from ProtonVPN.
- Flatpak overrides reset: Rerun
home-manager switchto reapply sandbox rules.
profile/scripts/firstboot-ssh-hardening.shscripts/setup-secure-firewall.shscripts/setup-secure-dns.shscripts/setup-auto-updates.shhome/modules/security.nix