Question 240
After completing this practical task on a test RHEL10 instance: An existing TCP port is assigned to the wrong SELinux port type and `semanage port -a` fails because the port already exists. Which operational safeguard helps keep the result correct and safe?
Explanation
Correct Answer
Check existing assignments before modifying SELinux port labels. This guards against recurrence of: Port type modifications and adding new mappings are different policy operations. Confirm the lab's final state by: `semanage port -l` shows the revised mapping without duplicate records.
Incorrect Answers
Verify port-label assignment and firewall exposure separately for nonstandard listener ports. That control is best suited to a separate scenario: A test web daemon is configured to listen on TCP 8088 but SELinux blocks binding despite a matching firewall rule. It is not the best safeguard for the current mechanism: Port type modifications and adding new mappings are different policy operations.
Test positive and negative access after SSH authorization changes. That control is best suited to a separate scenario: A server's `sshd` service is enabled but remote login fails because host key authentication was never established for the test user. It is not the best safeguard for the current mechanism: Port type modifications and adding new mappings are different policy operations.
Check active zone, SELinux port permission and service listener together. That control is best suited to a separate scenario: An application uses a nonstandard TCP port and a student opens it in firewalld but forgets the active zone. It is not the best safeguard for the current mechanism: Port type modifications and adding new mappings are different policy operations.