Question 630
You have attempted this task on a disposable RHEL10 training node: A firewall change is tested using only a runtime rule, but an administrator assumes it will be present after restart. Which command output or observation best confirms its success?
Explanation
Correct Answer
`firewall-cmd --permanent --zone=public --list-services` includes HTTPS and the state survives reboot. This check confirms the expected effect of: Use `firewall-cmd --zone=public --add-service=https --permanent` after review, followed by `firewall-cmd --reload`. It distinguishes the intended result from the original failure mechanism: Runtime and permanent firewalld configurations are separate.
Incorrect Answers
Current and configured SELinux modes converge to the intended approved state after reboot. That verifies a separate lab task: An administrator changes SELinux policy mode in `/etc/selinux/config` but the runtime `getenforce` output remains unchanged until the next reboot. It does not validate the implementation required here: Use `firewall-cmd --zone=public --add-service=https --permanent` after review, followed by `firewall-cmd --reload`.
The target zone contains the rule, the intended client connects and unrelated sources remain denied if separately restricted. That verifies a separate lab task: An application uses a nonstandard TCP port and a student opens it in firewalld but forgets the active zone. It does not validate the implementation required here: Use `firewall-cmd --zone=public --add-service=https --permanent` after review, followed by `firewall-cmd --reload`.
A normal new file is mode `600` or more restrictive and a new directory is mode `700` or more restrictive. That verifies a separate lab task: A shell session creates files with default modes exposing group-readable secrets to unrelated users. It does not validate the implementation required here: Use `firewall-cmd --zone=public --add-service=https --permanent` after review, followed by `firewall-cmd --reload`.