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...
IT & Cybersecurity Package Join Premium for Full Access