CompTIA Linux+ (XK0-005) — Question 154

A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?

Answer options

Correct answer: C

Explanation

The command 'firewall-cmd --list-services' displays the services that are currently allowed through the firewall, making option C the correct choice. Option A shows all available services, not just the allowed ones. Option B is used to validate the configuration, and option D checks the status of the firewalld service but does not list allowed services.