A systems administrator needs to block all incoming traffic from a known malicious IP address, 198.51.100.10, on a Linux server. The administrator wants to silently discard the packets without sending a response. Which of the following iptables commands will accomplish this?
The correct command is iptables -A INPUT -s 198.51.100.10 -j DROP. This command appends (-A) a rule to the INPUT chain, which processes packets coming to the server. The -s option specifies the source IP address. The -j DROP target tells iptables to silently discard the packet, which is the best practice for handling traffic from known malicious sources as it does not inform the sender that their packets have been blocked.
The OUTPUT chain is for outgoing traffic, so it is incorrect for this scenario. The REJECT target would block the packet but also send an error message back to the source, which is not what was requested. The FORWARD chain is used for packets that are being routed through the server, not destined for it.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between DROP and REJECT in iptables?
Open an interactive chat with Bash
What is the purpose of the INPUT, OUTPUT, and FORWARD chains in iptables?
Open an interactive chat with Bash
Why is it important to block known malicious IPs silently?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .