Which of the following commands will permit this traffic?
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
B . firewall-cmd ―service=1234 ―protocol=tcp
C . firewall-cmd ―add―port=1234/tcp
D . firewall-cmd ―add-whitelist-uid=1234
Answer: C
Explanation:
The firewall-cmd command 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 the firewall-cmd –add-port=1234/tcp command. 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 –permanent option 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.
The firewall-cmd –new-service=1234/tcp command does not exist. The firewall-cmd –service=1234 –protocol=tcp command does not work because 1234 is not a predefined service name in firewalld.
The firewall-cmd –add-whitelist-uid=1234 command does not exist.
References: [How to Use FirewallD to Manage Firewall in Linux]
Latest XK0-005 Dumps Valid Version with 136 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund