ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 184 - XK0-005 discussion

Report
Export

A systems administrator wants to permit access temporarily to an application running on port 1234/TCP on a Linux server. Which of the following commands will permit this traffic?

A.
firewall-cmd ---new-service=1234/tcp
Answers
A.
firewall-cmd ---new-service=1234/tcp
B.
firewall-cmd ---service=1234 ---protocol=tcp
Answers
B.
firewall-cmd ---service=1234 ---protocol=tcp
C.
firewall-cmd ---add---port=1234/tcp
Answers
C.
firewall-cmd ---add---port=1234/tcp
D.
firewall-cmd ---add-whitelist-uid=1234
Answers
D.
firewall-cmd ---add-whitelist-uid=1234
Suggested answer: C

Explanation:

Thefirewall-cmdcommand is used to manage firewalld, which is a firewall service for Linux systems that provides dynamic and persistent configuration of firewall rules. Firewalld uses zones and services to define different levels of trust and access for network connections.

To permit access temporarily to an application running on port 1234/TCP on a Linux server, the systems administrator can use thefirewall-cmd --add-port=1234/tcpcommand. This command will add a rule to the default zone (usually public) that allows incoming traffic on port 1234/TCP. The rule will only be effective until the next reload or restart of firewalld. To make the rule permanent, the administrator can add the--permanentoption to the command. The statement C is correct.

The statements A, B, and D are incorrect because they do not permit access to port 1234/TCP. Thefirewall-cmd --new-service=1234/tcpcommand does not exist. Thefirewall-cmd --service=1234 --protocol=tcpcommand does not work because 1234 is not a predefined service name in firewalld. Thefirewall-cmd --add-whitelist-uid=1234command does not exist.Reference: [How to Use FirewallD to Manage Firewall in Linux]

asked 02/10/2024
Subha Mishra
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first