CompTIA Linux+ (XK0-004) — Question 169

A Linux administrator is updating iptables rules and is given the following tasks:
✑ Output a list of iptables rules.
✑ Remove all iptables rules.
Which of the following actions should be performed from the terminal console to accomplish these tasks? (Choose two.)

Answer options

Correct answer: A, B

Explanation

The command 'iptables -L' is used to list the current rules, while 'iptables -F' is the command to flush or remove all rules. The other commands do not perform the required tasks: 'iptables -I' inserts rules, 'iptables -C' checks for rules, 'iptables -A' appends rules, and 'iptables -N' creates a new chain.