LFCS Networking Practice Question
Which iptables command allows incoming SSH traffic only from the 10.0.0.0/8 network?
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
It first adds a rule to accept SSH traffic from 10.0.0.0/8, then sets the default policy to DROP (or adds a final DROP rule), which blocks SSH from all other sources. Option A only accepts from the network without blocking others, so SSH from outside is still allowed if no other rule drops it. Option B sets the default policy to DROP but doesn't include an ACCEPT rule for the allowed source, so all SSH would be dropped. Option D uses an incorrect syntax or logic.
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 -A INPUT -p tcp --dport 22 -s 10.0.0.0/8 -j ACCEPT
Why it's wrong here
This only allows traffic from the network but does not block other sources; default policy likely ACCEPT.
- ✗
iptables -P INPUT DROP
Why it's wrong here
It first accepts SSH from the desired network, then drops all other SSH traffic. Option A allows all SSH if default policy is ACCEPT. Option B sets DROP default but without state tracking, return traffic may be blocked. Option D uses wrong chain or syntax.
Go deeper
Related to this question
About these practice questions
This LFCS 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.