CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux systems administrator is tasked with improving the performance of a server that acts as a firewall. The server is experiencing high CPU load and packet loss during peak traffic. An investigation reveals that the iptables configuration contains several thousand individual rules in the INPUT chain, each designed to drop packets from a specific malicious IP address. This list of IP addresses changes frequently.

Which of the following solutions would be the MOST efficient way to manage this large blocklist and alleviate the performance issues?

  • Use ipset to create a hash:ip set containing all the malicious IP addresses and replace the thousands of individual iptables rules with a single rule that references this set.

  • Combine all the individual iptables rules into a custom chain and add a single rule to the INPUT chain that jumps to this custom chain.

  • Migrate the firewall from iptables to ufw and create a deny rule for each malicious IP address.

  • Use firewalld and a script to add each malicious IP as a source for the built-in 'drop' zone.

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot