Certified SOC Analyst (CSA) — Question 8

Which of the following command is used to enable logging in iptables?

Answer options

Correct answer: C

Explanation

The correct command to enable logging for incoming packets is '$ iptables -A INPUT -j LOG', which appends a rule to the INPUT chain. The other options either attempt to log outgoing packets or use the wrong flag ('-B' instead of '-A'), which does not serve to append a logging rule.