Question 230
During a change window, a host has this problem: An HTTP service must initiate an approved outbound connection to its backend database but SELinux blocks network access. Which configuration change is most appropriate?
Explanation
Correct Answer
The change that addresses the reported condition is to enable the narrowly appropriate SELinux Boolean persistently if the use case warrants it. The host problem is: An HTTP service must initiate an approved outbound connection to its backend database but SELinux blocks network access. The supporting evidence is to inspect AVC denials and the relevant documented httpd_can_network_connect_db Boolean. Check success by verifying that the application reaches its authorized database in enforcing mode after reboot. The fix should be persistent where the task requires it.
Incorrect Answers
Add the approved persistent file context rule and apply restorecon to the new path. The alternative concerns adding the approved persistent file context rule and apply restorecon to the new path, not enabling the narrowly appropriate SELinux Boolean persistently if the use case warrants it.
Apply the authorized Boolean change with persistent semantics. This assesses the authorized Boolean change with persistent semantics; it does not determine the reported condition—an HTTP service must initiate an approved outbound connection to its backend database but SELinux blocks network access.
Place the approved public key in the correct account with secure SSH directory and file modes. The case-specific requirement is enabling the narrowly appropriate SELinux Boolean persistently if the use case warrants it, which that option does not establish.