Question 339 of 513
NetworkingeasyMultiple SelectObjective-mapped

LFCS Networking Practice Question

This LFCS practice question tests your understanding of networking. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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.

An administrator is configuring a Linux server to act as a web server. The server has two network interfaces: eth0 (public IP 203.0.113.10) and eth1 (private IP 10.0.0.10). The default policy on the INPUT chain is DROP. The administrator wants to allow incoming HTTP (port 80) traffic from any source but only to the public interface. Which TWO iptables rules should be added?

Question 1easymulti 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 -A INPUT -d 203.0.113.10 -p tcp --dport 80 -j ACCEPT

Option B is correct because it specifies the destination IP address (203.0.113.10) of the public interface, ensuring that HTTP traffic is only accepted when destined for that IP. Option C is also correct because it uses the `-i eth0` flag to match incoming traffic on the public interface only, which restricts HTTP access to the public-facing interface. Both rules are needed to satisfy the requirement of allowing HTTP from any source but only to the public interface, given the default DROP policy on the INPUT chain.

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 -A FORWARD -i eth0 -p tcp --dport 80 -j ACCEPT

    Why it's wrong here

    FORWARD chain is for routed traffic, not local input.

  • iptables -A INPUT -d 203.0.113.10 -p tcp --dport 80 -j ACCEPT

    Why this is correct

    Matches traffic destined to the public IP.

    Related concept

    Read the scenario before looking for a memorised answer.

  • iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT

    Why this is correct

    Matches incoming traffic on the public interface.

    Related concept

    Read the scenario before looking for a memorised answer.

  • iptables -A INPUT -s 203.0.113.10 -p tcp --dport 80 -j ACCEPT

    Why it's wrong here

    Specifies source IP instead of destination.

  • iptables -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT

    Why it's wrong here

    Allows traffic on the private interface, not desired.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse the INPUT and FORWARD chains, or incorrectly assume that specifying the source IP (`-s`) is equivalent to specifying the destination IP (`-d`), leading them to pick Option D or A instead of the correct combination of B and C.

Detailed technical explanation

How to think about this question

In iptables, the INPUT chain processes packets destined for the local system, while the FORWARD chain handles packets routed through the system. Using `-d` to match the destination IP is more precise than `-i` alone because it ensures the rule applies even if the interface has multiple IP addresses or if traffic arrives via a different path. A real-world scenario where this matters is when a server has multiple public IPs on the same interface; using `-d` allows selective filtering per IP, while `-i` alone would apply to all traffic on that interface.

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 LFCS 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 LFCS 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 LFCS question test?

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

What is the correct answer to this question?

The correct answer is: iptables -A INPUT -d 203.0.113.10 -p tcp --dport 80 -j ACCEPT — Option B is correct because it specifies the destination IP address (203.0.113.10) of the public interface, ensuring that HTTP traffic is only accepted when destined for that IP. Option C is also correct because it uses the `-i eth0` flag to match incoming traffic on the public interface only, which restricts HTTP access to the public-facing interface. Both rules are needed to satisfy the requirement of allowing HTTP from any source but only to the public interface, given the default DROP policy on the INPUT chain.

What should I do if I get this LFCS 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 25, 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 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.