nerdexam
CompTIA

XK0-005 · Question #418

A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to…

The correct answer is C. firewall-cmd --query-service http. The command firewall-cmd --query-service http will accomplish the task of checking whether web traffic has already been allowed through the firewall. The firewall-cmd command is a tool for managing firewalld, which is a firewall service that provides dynamic and persistent…

Security

Question

A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to accomplish this task?

Options

  • Afirewalld query-service-http
  • Bfirewall-cmd --check-service http
  • Cfirewall-cmd --query-service http
  • Dfirewalld --check-service http

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    91% (40)
  • D
    5% (2)

Explanation

The command firewall-cmd --query-service http will accomplish the task of checking whether web traffic has already been allowed through the firewall. The firewall-cmd command is a tool for managing firewalld, which is a firewall service that provides dynamic and persistent network security on Linux systems. The firewalld uses zones and services to define the rules and policies for the network traffic. The zones are logical groups of network interfaces and sources that have the same level of trust and security. The services are predefined sets of ports and protocols that are associated with certain applications or functions. The --query-service http option queries whether a service is enabled in a zone. The http is the name of the service that the command should check. The http service represents the web traffic that uses the port 80 and the TCP protocol. The command firewall- cmd --query-service http will check whether the http service is enabled in the default zone, which is usually the public zone. The command will return yes if the web traffic has already been allowed through the firewall, or no if the web traffic has not been allowed through the firewall.

Topics

#Firewall management#firewall-cmd#Network configuration#System security

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice