hardMultiple Choice
CAS-004 Practice Question: The engineer needs to prevent brute-force attacks…
Exhibit
Refer to the exhibit. Aug 15 14:23:10 server1 sshd[1234]: Failed password for root from 192.168.1.200 port 56789 ssh2 Aug 15 14:23:12 server1 sshd[1234]: Failed password for root from 192.168.1.200 port 56790 ssh2 Aug 15 14:23:15 server1 sshd[1234]: Failed password for root from 192.168.1.200 port 56791 ssh2 ... Aug 15 14:25:30 server1 sshd[1234]: Accepted password for admin from 10.0.0.50 port 34821 ssh2
The engineer needs to prevent brute-force attacks while allowing legitimate access. Which security control is MOST effective?
⚠ Common exam trap
The trap is choosing a simple hardening measure like changing the SSH port or disabling root login, which are good practices but do not actively prevent brute-force attacks, whereas fail2ban provides active blocking based on behavior.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Implement fail2ban with a threshold of 5 attempts per minute
Fail2ban is a security tool that monitors log files for suspicious patterns, such as repeated failed login attempts, and dynamically updates firewall rules to block the offending IP addresses. Implementing fail2ban with a threshold of 5 attempts per minute effectively mitigates brute-force attacks by temporarily or permanently banning IPs that exceed the threshold, while allowing legitimate users to access the system. This is more effective than the other options because it actively responds to brute-force behavior.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Disable root login
Why it's wrong here
Disabling root login blocks one account but leaves every other user exposed to password guessing, so brute-force attempts against normal accounts still succeed. It tempts as basic hardening, and is correct when the goal is preventing direct privileged-account compromise rather than throttling repeated authentication failures.
- ✗
Change SSH port to 2222
Why it's wrong here
Changing the SSH port only obscures the service from casual scans; it does not throttle repeated authentication attempts, so brute-force guessing continues unimpeded. It is tempting because port obfuscation reduces automated noise, and it would suit hardening against opportunistic scanners rather than defeating credential guessing itself.
- ✓
Implement fail2ban with a threshold of 5 attempts per minute
Why this is correct
Fail2ban dynamically bans source IPs after repeated authentication failures, directly throttling brute-force attempts while legitimate users continue unaffected. The five-per-minute threshold satisfies the stem's dual constraint: blocking automated guessing without locking out genuine access, unlike static lockout policies that deny valid users.
- ✗
Implement IP whitelist for 10.0.0.0/8
Why it's wrong here
An IP whitelist restricts access by source address, so an attacker inside 10.0.0.0/8 still brute-forces freely, and legitimate users outside that range are blocked. It tempts for limiting access to known networks, which suits internal-only services rather than stopping credential guessing.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 973-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.