XK0-005 · Question #431
A Linux administrator has togged 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 correct answer is C. firewall-cmd --list-services. The firewall-cmd --list-services command will return the results for which the administrator is looking. This command will list all services that are allowed through the firewall in the default zone or a specified zone. A service is a predefined set of ports and protocols that…
Question
A Linux administrator has togged 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?
Options
- Afirewall-cmd --get-services
- Bfirewall-cmd --check-config
- Cfirewall-cmd --list-services
- Dsystemctl status firewalld
How the community answered
(32 responses)- A3% (1)
- B3% (1)
- C94% (30)
Explanation
The firewall-cmd --list-services command will return the results for which the administrator is looking. This command will list all services that are allowed through the firewall in the default zone or a specified zone. A service is a predefined set of ports and protocols that can be enabled or disabled by firewalld. The firewall-cmd --get-services command will list all available services that are supported by firewalld, not only those that are allowed through the firewall. The firewall-cmd -- check-config command will check if firewalld configuration files are valid, not list services. The systemct1 status firewalld command will display information about the firewalld service unit, such as its state, PID, memory usage, and logs, not list services.
Topics
Community Discussion
No community discussion yet for this question.