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

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?
C) firewall-cmd --add-service={dns, http, https} --zone=internal
A) firewalld -- add-service=dns, http,https -- zone=internal
B) iptables -- enable-service='dns|http|https' -- zone=internal
D) systemctl mask firewalld --for={dns, http, https} --zone=internal

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
Tricia
4 hours ago
I think option C is the right choice. It’s the correct syntax for firewall-cmd.
upvoted 0 times
...
Han
5 days ago
Isn't D just masking the service instead of allowing traffic?
upvoted 0 times
...
Marylou
10 days ago
Definitely C, I've used it before with no issues.
upvoted 0 times
...
Regenia
16 days ago
Wait, can you really use firewalld like that?
upvoted 0 times
...
Alex
2 months ago
I think A is better, more straightforward.
upvoted 0 times
...
Lashon
2 months ago
C is the right command for that!
upvoted 0 times
...
Latrice
3 months 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
3 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
3 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
3 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