nerdexam
CompTIACompTIA

XK0-005 · Question #1426

XK0-005 Question #1426: Real Exam Question with Answer & Explanation

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 ca

System Management

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

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

#firewall-cmd#firewalld#Linux firewalls#network services

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions