Enterprise Linux reverse-proxy, directory, and bastion track
Operate a private loopback NGINX reverse-proxy site on an isolated Linux VM, diagnose controlled systemd and permission faults via journalctl and ss, and isolate Tier-0 identity directory services.
Prerequisites: a fresh disposable Enterprise Linux VM, an isolated or host-only VM network, a least-privilege operator account with scoped sudo, and console recovery. Start with Linux systemd and NGINX reverse-proxy operations before attempting a Tier-0 Identity Directory (OpenLDAP / FreeIPA / OIDC). Environment/evidence: runnable target-VM procedure inside your Firecracker Linux workspace. Outcome: operate one private loopback NGINX reverse-proxy site, diagnose a controlled fault from systemd and journal logs, and retire the site cleanly while preserving unrelated configuration.
Map the lifecycle
| Phase | Enterprise Linux-specific application |
|---|---|
| 1 Framework | Inventory VM, Linux distribution/kernel build, installed systemd units, service UIDs, and bastion access method. |
| 2 Beginner | Master Bash pipelines, systemd units, journalctl logs, POSIX/ACL permissions, and ss socket inspection. |
| 3 Architecture | Separate standalone app hosts, bastion gateways, and Tier-0 identity nodes; define DNS and trust boundaries. |
| 4 Provision | Build from a reviewed minimal Linux image; preserve serial console access and recovery snapshots; pin package repos. |
| 5 Foundation | Enforce SSH key-only admin access, ufw/nftables egress/ingress rules, non-root service accounts, and scoped secrets. |
| 6 Service | Configure an isolated NGINX server block, upstream socket, directory ownership/mode, and /health verification check. |
| 7 Go live | Verify loopback or intended interface binding, TLS certificate SANs, remote bastion reachability, and denied unauthorized traffic. |
| 8 Operate | Monitor NGINX error/access logs, systemd restart counts, file descriptors, disk usage, and security patch windows. |
| 9 Change | Validate configs with nginx -t, test graceful reloads (nginx -s reload), and verify clean reboot recovery. |
| 10 Recover | Restore application configs and TLS material from encrypted off-host backups; test directory LDIF/replica recovery separately. |
| 11 Retire | Drain callers, disable only the target server block, archive retained config evidence, and revoke site credentials. |
| 12 Assess | A second operator diagnoses a stopped site, a 403 permission error, and a bad upstream binding solely from runbook evidence. |
Inspect first and run the private loopback site lab
In your isolated Linux VM Bash shell, inspect host identity, running daemons, listening sockets, and NGINX build flags before changing anything:
Verify that no unrelated service already owns 127.0.0.1:8088. Create an isolated loopback server block in /etc/nginx/conf.d/mastery-lab.conf (or your workspace test config) serving a static verification response strictly on 127.0.0.1:8088 so the lab is never exposed on wildcard 0.0.0.0:80:
Expect an explicit 127.0.0.1:8088 socket binding, zero syntax errors from nginx -t, and HTTP 200 from curl -i. For production HTTPS, bind a certificate matching the real DNS hostname and validate the chain from a separate client; a loopback HTTP check proves local wiring, not public TLS trust.
Diagnose and recover one fault
After confirming the exact owned unit or server block, inject a single controlled failure and record the exact client symptom before repairing it:
Between stop and start, capture the exact failure mode. A stopped NGINX daemon (Connection refused), a dead upstream worker (HTTP 502 Bad Gateway), an invalid TLS certificate, and denied POSIX filesystem permissions (HTTP 403 Forbidden) are distinct faults with distinct evidence in ss -tulpn, /var/log/nginx/error.log, and namei -l <path>. Never run chmod -R 777 to silence an unexplained 403 error.
When expanding from loopback to remote access, specify the exact listening interface, ufw/nftables rule, and approved client CIDR. Verify both an authorized client connection and a deliberately denied external probe. Loopback success never proves that firewall boundaries are correctly restricted.
Treat Tier-0 Identity Directory Services as a separate system
An enterprise identity directory (FreeIPA, OpenLDAP with Kerberos, or an OIDC identity provider) is a Tier-0 security dependency, not another web application. Plan realm/domain names, authoritative DNS integration, administrative privilege tiers, chrony time synchronization, break-glass recovery credentials, and off-host encrypted backup/restore drills before deploying.
Run identity exercises strictly inside an isolated lab network with a disposable client VM. Provision a non-privileged user in a scoped group, enforce a narrow sudoers or RBAC rule, and prove both ordinary login and a deliberately denied administrative command. Never connect a tutorial identity server to a production corporate directory. A raw VM snapshot is not proof of supported directory recovery; test LDIF export/import and replica resynchronization on a scratch host.
For retirement of the loopback NGINX lab, confirm zero active callers in ss -tan, archive the configuration and verification receipt, remove only mastery-lab.conf, run nginx -t, and gracefully reload NGINX. Never purge the shared nginx package on a multi-service host during a lab cleanup. Directory retirement requires migrating all relying clients, revoking OIDC/Kerberos trust credentials, and decommissioning replicas cleanly before deleting the underlying VM.