Back to Build the Linux repository on SBD-REPO01

COURSE 1.2 · CONFIGURATION CHECKLIST

Build the Linux repository on SBD-REPO01

Secure By Design · Edition 1.0 · 14 October 2026

SBD-REPO01 is the Linux side's one road for operating-system packages, built before any Linux server exists so that SBD-SPLUNK01 (course 1.5) patches from it from its first day. It also stages the Linux assessment set, SCC for Linux and the distribution's STIG benchmark, that every Linux server is scanned with. Every Linux server in the lab runs a Red Hat Enterprise Linux–family distribution, so the commands use dnf, rpm, firewalld and update-ca-trust; choose one release for every Linux server and follow it throughout.

Download the workbook (Word)

Before you start

1. Design the repository and its trust

About 25 min · Open this lesson

Commands:

# On SBD-ADMIN-SRV01: start the evidence folder and confirm no record exists yet
New-Item -ItemType Directory -Force C:\Evidence\linux-repository | Out-Null
Resolve-DnsName SBD-REPO01.sbd.test -Server 10.0.10.10 -ErrorAction SilentlyContinue   # expected: no answer yet
# On the approved connected system: read each upstream signing key's fingerprint
gpg --show-keys --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release   # or the distribution's own key file

Verify: The design names the consumers, the one distribution and the repositories mirrored; each upstream key's fingerprint matches the vendor's published value; and the register carries F19, F01, F07 and SBD-REPO01's added time row, each with an owner.

Evidence: Keep the repository design (job, consumers, distribution, repositories, snapshot naming), the verified key fingerprints with where you checked them, and the register rows that name SBD-REPO01.

Notes / result / date:

2. Build and harden SBD-REPO01

About 40 min · Open this lesson

Commands:

hostnamectl; ip -4 addr show
grep -E '^(pool|server|sourcedir|allow|maxdistance)' /etc/chrony.conf   # both controllers and maxdistance 16, nothing else
chronyc sources -v; chronyc tracking   # ^* one controller, ^+ or ^- the other; System time offset small and steady
sshd -T | grep -Ei '^(permitrootlogin|passwordauthentication|allowgroups) '
# On SBD-ADMIN-SRV01: export the course 1.1 root and compare its hash with part 6's record, then copy it over
Get-ChildItem Cert:\LocalMachine\Root | Where-Object Subject -like '*<root CA name>*' | Export-Certificate -FilePath C:\Evidence\linux-repository\sbd-root.cer
Get-FileHash -Algorithm SHA256 C:\Evidence\linux-repository\sbd-root.cer
scp C:\Evidence\linux-repository\sbd-root.cer <your-account>@SBD-REPO01.sbd.test:/tmp/
# On SBD-REPO01: the same fingerprint, then the system trust store
openssl x509 -inform der -in /tmp/sbd-root.cer -noout -fingerprint -sha256
sudo cp /tmp/sbd-root.cer /etc/pki/ca-trust/source/anchors/ && sudo update-ca-trust
trust list --filter=ca-anchors | grep -i '<root CA name>'   # expected: the SBD root
apachectl -S        # expected: one site on 10.0.70.20:80
ss -tlnp            # expected: 22 and 80, plus loopback-only listeners, if any
firewall-cmd --get-active-zones
firewall-cmd --list-all --zone=public   # expected: no services
curl -sI http://SBD-REPO01.sbd.test/ | head -1   # expected: 403, no directory listing

Verify: SBD-REPO01 resolves to 10.0.70.20 and, with course 1.1's chrony file and the hypervisor's time synchronization off, syncs from a domain controller with a small, stable offset; sshd refuses root and passwords and admits only the admin group; the system trust store holds the part 6 root, its hash matching part 6's record; only TCP 22 and 80 listen; the firewall admits SSH from 10.0.60.20 alone and HTTP from the three registered consumers alone; and the web root returns 403 instead of a listing.

Evidence: Keep the install media hash, the chrony file with its sources and tracking output, the root certificate's hash compared with course 1.1's record, the effective sshd settings, the Apache site and listener output, the firewall zones, and the administrator account list (names only, no keys or passwords).

Notes / result / date:

3. Mirror, verify, and publish a snapshot

About 35 min · Open this lesson

Commands:

# Connected side: keep vendor metadata, delete anything whose signature fails
dnf reposync --repoid=<baseos-repo-id> --repoid=<appstream-repo-id> --download-metadata --gpgcheck -p /srv/stage/2026-10-13
cd /srv/stage/2026-10-13 && find . -type f -print0 | sort -z | xargs -0 sha256sum > ../SHA256SUMS-2026-10-13.txt
# On SBD-REPO01, after the crossing:
cd /srv/incoming/2026-10-13 && sha256sum -c --quiet ../SHA256SUMS-2026-10-13.txt   # expected: no output
find . -name '*.rpm' -print0 | xargs -0 rpm -K | grep -v 'digests signatures OK'   # expected: no output
mv /srv/incoming/2026-10-13 /srv/repo/snapshots/ && restorecon -R /srv/repo/snapshots/2026-10-13
ln -sfn snapshots/2026-10-13 /srv/repo/current.new && mv -T /srv/repo/current.new /srv/repo/current

Verify: The manifest check and the signature check both pass with no exceptions, /srv/repo/current points at the new dated snapshot, the previous snapshot (if any) is untouched, and the catalog entry carries the fingerprints and manifest hash.

Evidence: Keep the manifest and its hash, the transfer record, the clean signature-check output, the catalog entry, and the hashes of the copies filed on SBD-ADMIN-SRV01.

Notes / result / date:

4. Configure the Linux clients

About 30 min · Open this lesson

Commands:

dnf repolist --all                 # expected: only the sbd-repo01 repositories enabled
rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
dnf makecache && dnf info rsyslog-gnutls | grep -Ei '^(repository|from repo)'   # expected: from the sbd-repo01 repositories
# Hash the client package for the later courses
sha256sum /srv/repo-records/client/*

Verify: On SBD-REPO01 the package manager lists SBD-REPO01 as its only source, trusts only the verified keys, refreshes without errors, and resolves rsyslog-gnutls from the snapshot; the client package is hashed and filed.

Evidence: Keep the source listing, the trusted key list, the refresh output, the package's source line, and the client package with its hashes.

Notes / result / date:

5. Keep it current and prove it

About 40 min · Open this lesson

Commands:

# On SBD-REPO01: promote the next snapshot, then rehearse rollback
readlink /srv/repo/current
ln -sfn snapshots/2026-11-10 /srv/repo/current.new && mv -T /srv/repo/current.new /srv/repo/current
ln -sfn snapshots/2026-10-13 /srv/repo/current.new && mv -T /srv/repo/current.new /srv/repo/current   # rollback
# On SBD-ADMIN-SRV01: no output means every staged file is on the connected-side list
(Get-ChildItem C:\Staging\DISA\linux\* -File -Exclude *.csv | Get-FileHash -Algorithm SHA256).Hash | Where-Object { $_ -notin (Import-Csv C:\Staging\DISA\linux\connected-side-hashes.csv).Hash }
scp C:\Staging\DISA\linux\<SCC for Linux package> C:\Staging\DISA\linux\<STIG benchmark> <your-account>@SBD-REPO01.sbd.test:/tmp/
# On SBD-REPO01: the same hashes, then SCC's command-line scanner as root (path and options from the SCC readme)
sha256sum /tmp/<SCC for Linux package> /tmp/<STIG benchmark>
sudo <SCC install directory>/cscc
# On SBD-ADMIN-SRV01: collect the session and the record, then hash everything
New-Item -ItemType Directory -Force C:\Evidence\linux-repository\baseline | Out-Null
scp -r <your-account>@SBD-REPO01.sbd.test:<SCC session folder> C:\Evidence\linux-repository\baseline\SBD-REPO01
scp -r <your-account>@SBD-REPO01.sbd.test:/srv/repo-records/* C:\Evidence\linux-repository\
Get-ChildItem C:\Evidence\linux-repository -Recurse -File | Get-FileHash -Algorithm SHA256 | Export-Csv C:\Evidence\linux-repository-hashes.csv -NoTypeInformation

Verify: The cadence is written with an approver, the promotion and the rollback both show in the catalog and in the client's view, the Linux assessment set sits checked in C:\Staging\DISA\linux on SBD-ADMIN-SRV01, SBD-REPO01 has a first baseline with every open item classified, and the record and handoff are filed with hashes.

Evidence: Keep the cadence, the catalog showing promotion and rollback, the Linux assessment set's hash check, the SCC results and STIG Viewer checklist, the classified findings, the administration record, the hash list, and the handoff note to course 1.3.

Notes / result / date:

Sources