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
Alex
18 days ago
I think A is better, more straightforward.
upvoted 0 times
...
Lashon
23 days ago
C is the right command for that!
upvoted 0 times
...
Latrice
1 month ago
I definitely remember that you can't mask services with systemctl like option D suggests, so that one is definitely out.
upvoted 0 times
...
Elly
2 months ago
I feel like I might have seen a question similar to this in our study group, but I can't recall if it was about iptables or firewalld.
upvoted 0 times
...
Jeanice
2 months ago
I remember practicing with firewall-cmd commands, and I think option C looks familiar. It seems to be the right format for adding services to a zone.
upvoted 0 times
...
Heike
2 months ago
I think the command should be related to firewalld since it's commonly used in modern Linux systems, but I'm not sure about the exact syntax.
upvoted 0 times
...

Save Cancel