Which of the following commands should the administrator use to accomplish this task?

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?
A . firewalld query-service-http
B . firewall-cmd –check-service http
C . firewall-cmd –query-service http
D . firewalld –check-service http

Answer: C

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. This is the correct command to use to accomplish the task. The other options are incorrect because they either do not exist (firewalld query-service-http or firewalld –check-service http) or do not query the service (firewall-cmd–check-service http instead of firewall-cmd –query-service http).

References: CompTIA Linux+ (XK0-005)

Certification Study Guide, Chapter 12: Managing Network Connections, page 392.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments