LPIC-2 Advanced Networking Configuration Practice Question
Which TWO steps are required to enable IP forwarding on a Linux system permanently?
⚠ Common exam trap
Watch out — candidates often confuse runtime-only commands (like `echo 1 > /proc/sys/...` or `sysctl -w`) with permanent configuration, forgetting that persistence requires writing to a configuration file such as `/etc/sysctl.conf` or `/etc/sysctl.d/`.
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
✓
Add net.ipv4.ip_forward=1 to /etc/sysctl.conf
Adding `net.ipv4.ip_forward=1` to `/etc/sysctl.conf` makes the change persistent across reboots. Option C is correct because running `sysctl --system` loads settings from all sysctl configuration files (including `/etc/sysctl.conf`) without requiring a reboot, applying the change immediately and permanently. Together, these two steps ensure IP forwarding is enabled both now and after system restart.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add net.ipv4.ip_forward=1 to /etc/sysctl.conf
Why this is correct
Persists configuration to be loaded at boot.
- ✗
echo 1 > /proc/sys/net/ipv4/ip_forward
Why it's wrong here
Immediate but temporary; does not persist across reboots.
- ✓
sysctl --system
Why this is correct
Applies settings from sysctl files without rebooting.
- ✗
sysctl -w net.ipv4.ip_forward=1
Why it's wrong here
Also temporary; changes only runtime.
- ✗
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Why it's wrong here
Enables masquerading (NAT), not IP forwarding.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.