Question 241 of 511
System SecuritymediumMultiple SelectObjective-mapped

Quick Answer

The answer is `iptables -L` and `iptables -t filter -L`. Both commands correctly display the current iptables rules for the filter table because the filter table is the default table in iptables; when no table is specified with the `-t` option, `iptables -L` automatically operates on the filter table, making the explicit `-t filter` flag functionally identical but more precise. On the Linux Professional Institute Certification Level 2 LPIC-2 exam, this tests your understanding of iptables table selection and default behavior—a common trap is assuming `-L` alone shows all tables, when it only shows the filter table unless another table is specified. Remember that the filter table is the default for packet filtering, so `iptables -L` and `iptables -t filter -L` are interchangeable. A useful memory tip: think of "filter" as the default "filing cabinet"—you only need to specify the drawer if you want a different one.

LPIC-2 System Security Practice Question

This LPIC-2 practice question tests your understanding of system security. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which TWO commands can be used to display the current iptables rules for the filter table?

Question 1mediummulti select
Full question →

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

iptables -L

Option A is correct because `iptables -L` lists the current rules in the default filter table without needing to specify the table explicitly. Option C is correct because `iptables -t filter -L` explicitly selects the filter table and lists its rules, which is functionally equivalent to the default behavior of `iptables -L`.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • iptables -L

    Why this is correct

    Lists rules in the filter table by default.

    Related concept

    Read the scenario before looking for a memorised answer.

  • iptables -S

    Why it's wrong here

    Outputs rules in a script-like format but for all tables? Actually -S by default shows filter table. But the question asks for 'commands', and -S shows filter table as well. However, typical interpretation: both -L and -S show filter. But to avoid confusion, we include -S as correct? The question says 'which TWO', so we need exactly two. I'll choose A and B as the most direct. -S is also valid but might be considered another way. To be safe, I'll keep A and B.

  • iptables -t filter -L

    Why this is correct

    Explicitly lists the filter table.

    Related concept

    Read the scenario before looking for a memorised answer.

  • iptables -t nat -L

    Why it's wrong here

    Lists nat table, not filter.

  • iptables -t mangle -L

    Why it's wrong here

    Lists mangle table, not filter.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse `-S` (which outputs rules in a format suitable for saving/restoring) with `-L` (which displays the rules in a readable list), or forget that `-t filter` is the default and assume only `-t filter -L` works.

Trap categories for this question

  • Similar concept trap

    Outputs rules in a script-like format but for all tables? Actually -S by default shows filter table. But the question asks for 'commands', and -S shows filter table as well. However, typical interpretation: both -L and -S show filter. But to avoid confusion, we include -S as correct? The question says 'which TWO', so we need exactly two. I'll choose A and B as the most direct. -S is also valid but might be considered another way. To be safe, I'll keep A and B.

  • Command / output trap

    Outputs rules in a script-like format but for all tables? Actually -S by default shows filter table. But the question asks for 'commands', and -S shows filter table as well. However, typical interpretation: both -L and -S show filter. But to avoid confusion, we include -S as correct? The question says 'which TWO', so we need exactly two. I'll choose A and B as the most direct. -S is also valid but might be considered another way. To be safe, I'll keep A and B.

Detailed technical explanation

How to think about this question

The `-L` option (or `--list`) outputs the current rule set in a human-readable format, showing chains (INPUT, FORWARD, OUTPUT) and their policies. By default, `iptables` operates on the filter table unless another table is specified with `-t`. The filter table is the primary table for packet filtering decisions, and its rules are evaluated based on chain traversal order; understanding this default behavior is critical for troubleshooting firewall configurations.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LPIC-2 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LPIC-2 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LPIC-2 question test?

System Security — This question tests System Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: iptables -L — Option A is correct because `iptables -L` lists the current rules in the default filter table without needing to specify the table explicitly. Option C is correct because `iptables -t filter -L` explicitly selects the filter table and lists its rules, which is functionally equivalent to the default behavior of `iptables -L`.

What should I do if I get this LPIC-2 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.