Courseiva
System SecuritymediumDrag & DropObjective-mapped

LPIC-2 System Security Practice Question

Order the steps to configure a Linux system as a router using iptables.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

Enable IP forwarding, set default iptables policies, add NAT and FORWARD rules, then save the iptables configuration.

When configuring a Linux system as a router using iptables, the proper order is: first enable IP forwarding (via sysctl), then set default iptables policies (e.g., DROP for FORWARD), then add NAT (e.g., MASQUERADE) and FORWARD rules, and finally save the iptables configuration to make it persistent. This sequence ensures the kernel is prepared for routing, policies are in place to control traffic flow, rules are applied correctly, and changes are saved.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Enable IP forwarding, set default iptables policies, add NAT and FORWARD rules, then save the iptables configuration.

    Why this is correct

    This is the correct order because enabling forwarding is a prerequisite for routing, policies must be set before adding rules to ensure proper security, and saving persists the configuration.

  • Set default iptables policies, enable IP forwarding, add NAT and FORWARD rules, then save the iptables configuration.

    Why it's wrong here

    This is incorrect because enabling IP forwarding should be done first to activate routing capability before applying iptables policies and rules.

  • Save the iptables configuration, enable IP forwarding, set default iptables policies, then add NAT and FORWARD rules.

    Why it's wrong here

    This is incorrect because saving before adding rules would save an empty or incomplete configuration, defeating the purpose of persistence.

  • Add NAT and FORWARD rules, enable IP forwarding, set default iptables policies, then save the iptables configuration.

    Why it's wrong here

    This is incorrect because enabling IP forwarding should precede rule addition to ensure the kernel is ready to route traffic, and policies should be set before rules to define default behavior.

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

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 →

How Courseiva writes practice questions · Editorial policy

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.