Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA XK0-006 Exam - Topic 2 Question 3 Discussion

Actual exam question for CompTIA's XK0-006 exam
Question #: 3
Topic #: 2
[All XK0-006 Questions]

A Linux administrator is testing a web application on a laboratory service and needs to temporarily allow DNS and HTTP/HTTPS traffic from the internal network. Which of the following commands will accomplish this task?

Show Suggested Answer Hide Answer
Suggested Answer: C

Comprehensive and Detailed Explanation From Exact Extract:

The correct way to temporarily allow specific services in a particular zone with firewalld is to use firewall-cmd --add-service=service --zone=zone. Multiple services can be specified in curly braces and separated by commas. The correct syntax is:

bash

CopyEdit

firewall-cmd --add-service={dns,http,https} --zone=internal

This command will allow DNS (port 53), HTTP (port 80), and HTTPS (port 443) through the firewall for the 'internal' zone temporarily (for the current runtime session).

Other options:

A . The command syntax is incorrect; firewalld is a service, not a command-line tool.

B . iptables does not use the --enable-service flag, nor does it have zones in this way.

D . systemctl mask disables services, and the rest of the command is invalid.


CompTIA Linux+ Study Guide: Exam XK0-006, Sybex, Chapter 9: 'Networking', Section: 'Managing Firewalls with firewalld'

CompTIA Linux+ XK0-006 Objectives, Domain 2.0: Networking

===========

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel