LPIC-2 SELinux boolean Practice Question
A web server is running in enforcing mode under SELinux. The administrator wants to allow Apache to connect to a remote database server. Which SELinux boolean needs to be set to allow httpd to make network connections?
⚠ Common exam trap
The trap is that candidates might choose the generic `httpd_can_network_connect` thinking it covers all network connections, but the question specifies a remote database server, making the database-specific boolean `httpd_can_network_connect_db` the correct and more precise answer.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
httpd_can_network_connect_db
The SELinux boolean `httpd_can_network_connect_db` is specifically designed to allow the httpd process to connect to remote database servers. This boolean is more targeted than the generic `httpd_can_network_connect`, which permits all outbound TCP connections. Since the question explicitly mentions a remote database server, the specific boolean is the most appropriate choice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
httpd_enable_homedirs
Why it's wrong here
Incorrect. `httpd_enable_homedirs` controls whether httpd can read user home directories, not network connections.
- ✓
httpd_can_network_connect_db
Why this is correct
Correct. This boolean is specifically designed to allow httpd to connect to remote database servers.
- ✗
httpd_can_network_connect
Why it's wrong here
Incorrect. While `httpd_can_network_connect` does allow network connections, it is too broad for the specific scenario of connecting to a remote database server. The more specific boolean `httpd_can_network_connect_db` is available and is the best choice.
- ✗
httpd_unified
Why it's wrong here
Incorrect. `httpd_unified` is not a standard SELinux boolean; it does not relate to network connectivity.
Visual reference
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.