Courseiva
Networking →mediumMultiple Choice

LFCS Networking Practice Question

A Linux server acting as a VPN gateway uses an nftables ruleset in the inet filter table. The administrator wants all forwarded traffic from the 10.8.0.0/24 VPN subnet to the 192.168.50.0/24 LAN to be accepted, while dropping any other forwarded traffic. Which nftables rule should be added to the forward chain to accomplish this?

⚠ Common exam trap

It's easy for candidates to confuse the input chain with the forward chain, when routed traffic between two remote networks is only evaluated by the forward chain.

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 add rule inet filter forward ip saddr 10.8.0.0/24 ip daddr 192.168.50.0/24 accept

Forwarded traffic between two networks is evaluated in the forward chain of the inet filter table. The rule must use ip saddr for the VPN subnet and ip daddr for the LAN subnet with an accept verdict. Placing this rule before any default drop policy permits only the specified flow, and other forwarded traffic is refused by the chain policy.

Answer analysis

Option-by-option breakdown

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

  • ✗

    nft add rule inet filter forward ip daddr 10.8.0.0/24 ip saddr 192.168.50.0/24 accept

    Why it's wrong here

    This rule reverses the source and destination addresses, matching return traffic from the LAN to the VPN rather than the forward direction. It would not permit the VPN-to-LAN packets described. While return traffic also needs handling, this rule alone does not satisfy the stated requirement for the forward flow.

  • ✓

    nft add rule inet filter forward ip saddr 10.8.0.0/24 ip daddr 192.168.50.0/24 accept

    Why this is correct

    This rule matches forwarded packets whose source is in the VPN subnet and destination is in the LAN, then accepts them. Because nftables evaluates rules in order and the final policy can be drop, placing this accept before a drop rule or default drop policy correctly permits only the intended traffic while blocking everything else.

  • ✗

    nft add rule inet filter forward ip saddr 10.8.0.0/24 ip daddr 192.168.50.0/24 drop

    Why it's wrong here

    This rule explicitly drops the exact traffic the administrator wants to allow. The source and destination match the permitted flow, so the drop verdict would block legitimate VPN-to-LAN packets. The intent is to accept this flow and drop only other forwarded traffic, so the verdict must be accept, not drop.

  • ✗

    nft add rule inet filter input ip saddr 10.8.0.0/24 ip daddr 192.168.50.0/24 accept

    Why it's wrong here

    The input chain handles traffic destined for the local host, not traffic being routed between networks. Forwarded VPN packets traverse the forward chain, so a rule in the input chain will never match them. The traffic would still be dropped by the forward chain policy, breaking routing for the VPN clients.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

About these practice questions

This LFCS question is part of Courseiva's 406-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint

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.