nerdexam
Linux_Foundation

LFCS · Question #224

What does the following iptables rule accomplish: iptables A INPUT s 208.77.188.166 j DROP

The correct answer is D. Drops all traffic from 208.77.188.166. The iptables rule described will block all incoming network traffic originating from the specified source IP address.

Submitted by jian89· Apr 18, 2026Networking

Question

What does the following iptables rule accomplish: iptables A INPUT s 208.77.188.166 j DROP

Options

  • AForwards all incoming traffic to the host 208.77.188.166.
  • BAccepts all traffic from 208.77.188.166.
  • CNothing, there is a syntax error.
  • DDrops all traffic from 208.77.188.166.

How the community answered

(16 responses)
  • B
    6% (1)
  • C
    6% (1)
  • D
    88% (14)

Why each option

The `iptables` rule described will block all incoming network traffic originating from the specified source IP address.

AForwards all incoming traffic to the host 208.77.188.166.

This rule does not forward traffic; it explicitly blocks it. Forwarding is typically handled by the `FORWARD` chain or NAT rules.

BAccepts all traffic from 208.77.188.166.

The `j DROP` target explicitly discards traffic, it does not accept it. The `ACCEPT` target is used for allowing traffic.

CNothing, there is a syntax error.

The rule `iptables -A INPUT -s 208.77.188.166 -j DROP` has correct `iptables` syntax and will execute as intended.

DDrops all traffic from 208.77.188.166.Correct

The `iptables -A INPUT` command appends a rule to the `INPUT` chain, which processes incoming packets destined for the local host. The `-s 208.77.188.166` flag specifies the source IP address, and `-j DROP` means that any packet matching these criteria will be silently discarded without any notification to the sender.

Concept tested: Iptables basic packet filtering

Source: https://linux.die.net/man/8/iptables

Topics

#iptables#firewall rules#packet filtering#network security

Community Discussion

No community discussion yet for this question.

Full LFCS Practice