LPIC-1 Essential System Services and Networking Practice Question
Which TWO commands can be used to display the current firewall rules in a system using nftables? (Choose two.)
⚠ Common exam trap
Many candidates confuse the legacy iptables command (`iptables -L -n`) with nftables, or assume that `systemctl status nftables` shows rules, when in fact it only shows the service's runtime state.
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
✓
nft list ruleset
`nft list ruleset` is the primary command in nftables to display the entire ruleset, including all tables, chains, and rules, regardless of the address family. Option D is also correct because `nft list table inet filter` specifically displays the rules within the 'filter' table of the 'inet' family, which is a valid way to show a subset of the firewall rules. Both commands rely on the nftables framework, which is the modern replacement for iptables on Linux.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
systemctl status nftables
Why it's wrong here
Shows service status, not rules.
- ✗
iptables -L -n
Why it's wrong here
iptables is legacy, not nftables.
- ✓
nft list ruleset
Why this is correct
Lists entire nftables ruleset.
- ✓
nft list table inet filter
Why this is correct
Lists rules in the filter table.
- ✗
firewall-cmd --list-all
Why it's wrong here
firewall-cmd is for firewalld, not nftables.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 527 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-1 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-1 exam.