Not run from this page

Close the holes, then write down a drill.

These commands are for an admin login as shellcore. The registry, audit01 firewall, SSH drop-in, peer-only VRRP rule, and unused Cockpit service were applied on 2026-12-05. What is still open is the Keepalived script block, the SSSD sudo search base, and the drills.

1. Registry publish, on mgmt01 — done

Applied. The container is --network=host with only the data volume. Do not remount /srv/registry-auth. Do not add plaintext htpasswd. That mount crash-looped the registry, and plaintext auth breaks bootc switch without TLS.

sudo podman rm -f lab-registry
sudo podman run -d --name lab-registry --restart=always --network=host \
  -v /srv/registry:/var/lib/registry:Z \
  docker.io/library/registry:2
curl -fsS http://127.0.0.1:5000/v2/

Local curl must print {}. mikanko (10.77.20.1) must also get {}. web01 and audit01 must be refused. That check passed on 2026-12-05. A -p 5000:5000 publish would reopen the bypass.

2. Audit VM firewall, on audit01 — done

Applied. firewalld is active, cockpit.socket is disabled, and nothing listens on 9090. Effective sshd -T is password off, keyboard-interactive off, root login off, and X11 forwarding off. The drop-in that works is 01-lab-hardening.conf, not 99-. A 99- file is read after 50-cloud-init.conf and loses.

3. Same SSH drop-in — done

Applied on mgmt01, db01, mon01, rhel10-app, and audit01. All four effective settings are no. The file name is 01-lab-hardening.conf.

4. VRRP peer rule — done; script block still open

The unscoped rule protocol value="vrrp" accept is gone on both load balancers. lb01 accepts VRRP only from 10.77.20.16. lb02 accepts it only from 10.77.20.15. Do not add the unscoped rule back.

Still not applied: enable_script_security is not in keepalived.conf. On each of lb01 and lb02, put this at the top if it is not already there. Keep mode 0600. Do not run the insert twice. Do not print the keepalived secret.

global_defs {
    enable_script_security
    script_user root
}
sudo chmod 0600 /etc/keepalived/keepalived.conf
sudo keepalived -t -f /etc/keepalived/keepalived.conf && sudo systemctl restart keepalived

5. Sudo search base, six enrolled hosts

for ip in 10.77.20.11 10.77.20.12 10.77.20.15 10.77.20.16 10.77.20.19 10.77.20.29; do
  ssh "shellcore@${ip}" "sudo grep -q '^ldap_sudo_search_base' /etc/sssd/sssd.conf || sudo sed -i '/^\[domain\/lab\.internal\]/a ldap_sudo_search_base = ou=sudoers,dc=lab,dc=internal' /etc/sssd/sssd.conf && sudo sss_cache -E && sudo systemctl restart sssd"
done

6. Cockpit left in the zone — done

Applied on mikanko and idm02. The active public zone on those hosts no longer lists cockpit. The sockets were already inactive.

Drills, after the fixes

Do these yourself and write down the times and the output. They are not results yet.