Security
A server runs iptables. An administrator must drop traffic from about 50,000 known-bad IPv4 addresses without slowing packet processing or creating thousands of rules. Which approach BEST meets this need?
Show the answer
Correct answerA. Create a hash:ip ipset and add one iptables rule that uses -m set --match-set with the set as the source
An ipset hash:ip set is looked up in near-constant time, and a single rule using the set match applies it. Thousands of individual rules are checked sequentially, which is what causes the slowdown. The -s option takes addresses or networks, not set names.