Linux+ XK0-006 practice question 7: Security
A server should accept SSH only from the management subnet, and the administrator uses firewalld. Which approach follows least privilege?
The options
- A. Create a rich rule or zone source that allows the ssh service only from the management subnet.
- B. Disable the firewall and rely on the SSH banner.
- C. Move SSH to port 2222 and consider it secure.
- D. Open port 22 to all addresses for convenience.
Answer and why
The correct answer is A: Create a rich rule or zone source that allows the ssh service only from the management subnet.
A. Limiting the source network exposes SSH to only the people who need it.
B. A banner is not an access control.
C. A changed port is obscurity and does not restrict who can connect.
D. Opening to everyone exposes the service to the whole internet.
What Security tests
Security is firewalls, SELinux and AppArmor, SSH hardening, auditing and encryption. The best answer is usually the narrowest change that meets the requirement without turning a control off.
Security is 18% of the XK0-006 exam. The exam has 90 questions in 90 minutes, so this question is a slice of the real mix, not a prediction of your result.
Try these next
Each one is a free question from the same practice test, with the answer and the reason for every option on its own page.
- A web server process is denied access to a directory that its Unix permissions allow, and the audit log shows an SELinux denial. What is the correct fix?
- To reduce brute-force risk on an SSH server, which change is the strongest single hardening step?
- An administrator needs to see which block devices are attached, with their sizes and mount points, in a tree. Which command does that?
- A new disk partition has been formatted and must be mounted at boot. Which file should the administrator add an entry to?
Keep going
This is question 7 of 15 in the free Linux+ XK0-006 practice test. If you missed it, say why in one sentence before you read on: the reason is what transfers to a differently worded question.