Interview Prep/Linux/Security, hardening and incident response

How do you make sure only signed, approved packages can be installed on your servers?

IntermediateScenarioSecurity, hardening and incident response
Answer

Situation read → GPG verification plus controlled repositories.

What I'd do →

  1. Keep gpgcheck=1 (and repo_gpgcheck=1 where supported) in every .repo file; for apt, use signed-by= keyrings.
  2. Point servers only at an internal mirror (Satellite, Pulp, Artifactory) with approved content.
  3. Block direct internet egress from servers.
  4. Alert on rpm -qa --qf '%{NAME} %{SIGPGP:pgpsig}\n' showing unsigned packages.

Why → Signature checks stop tampered packages; internal mirrors control what is approved.

Interview tip → Mention apt's move away from apt-key to per-repo signed-by keyrings.

All Linux questions Roadmap: Linux

More on Security, hardening and incident response