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 →
- Keep
gpgcheck=1(andrepo_gpgcheck=1where supported) in every.repofile; for apt, usesigned-by=keyrings. - Point servers only at an internal mirror (Satellite, Pulp, Artifactory) with approved content.
- Block direct internet egress from servers.
- 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.
More on Security, hardening and incident response
Monitoring shows a web server making outbound connections to an unknown IP on port 4444 at 2 AM. You suspect it is compromised. What do you do?AdvancedAfter the compromise you need to find how the attacker got in. Where do you look?AdvancedYour CISO asks you to harden a fresh Linux server baseline. What's on your list?IntermediateA developer says "SELinux keeps breaking my app, can we just disable it?" How do you respond and what do you do?IntermediateYou need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?IntermediateA critical OpenSSL CVE is announced. How do you find and patch affected servers quickly?Intermediate