CompTIA Linux+ (XK0-005) — Question 210
A systems administrator is working on a security report from the Linux servers. Which of the following commands can the administrator use to display all the firewall rules applied to the Linux servers? (Choose two.)
Answer options
- A. ufw limit
- B. iptables -F
- C. systemctl status firewalld
- D. firewall-cmd --list-all
- E. ufw status
- F. iptables -A
Correct answer: D, E
Explanation
The correct answers are D and E because 'firewall-cmd --list-all' displays all active rules when using firewalld, while 'ufw status' shows the status and rules for ufw. Options A, B, C, and F do not provide a comprehensive view of the firewall rules; for instance, 'iptables -F' flushes rules and 'systemctl status firewalld' only checks the service status.