nerdexam
CompTIACompTIA

XK0-005 · Question #1574

XK0-005 Question #1574: Real Exam Question with Answer & Explanation

The correct answer is C: firewall-cmd --add-port=1234/tcp. {"question_number": 6, "question": "Which firewall-cmd command temporarily permits traffic on port 1234/TCP?", "correct_answer": "C", "explanation": "'firewall-cmd --add-port=1234/tcp' adds port 1234/TCP to the active firewall zone at runtime. Because the --permanent flag is omit

Security

Question

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?

Options

  • Afirewall-cmd --new-service=l234/tcp
  • Bfirewall-cmd --service=l234 --protocol=tcp
  • Cfirewall-cmd --add-port=1234/tcp
  • Dfirewall-cmd --add-whitelist-uid=l234

Explanation

{"question_number": 6, "question": "Which firewall-cmd command temporarily permits traffic on port 1234/TCP?", "correct_answer": "C", "explanation": "'firewall-cmd --add-port=1234/tcp' adds port 1234/TCP to the active firewall zone at runtime. Because the --permanent flag is omitted, this change is temporary and will be lost after a firewall reload or system reboot - which matches the requirement to permit access 'temporarily'. '--new-service' creates a new named service definition, not a direct port rule. '--service=1234 --protocol=tcp' is not valid firewall-cmd syntax for adding a port. '--add-whitelist-uid' is not a real firewall-cmd option.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#Linux firewall#firewall-cmd#Port management#Network security

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions