nerdexam
GIAC

GSEC · Question #213

You work as a Network Administrator for Net World Inc. The company has a Linux-based network. For testing purposes, you have configured a default IP-table with several filtering rules. You want to…

The correct answer is D. IPTABLES -F. The iptables -F (flush) command removes all rules from every chain in the specified table, effectively resetting the filtering ruleset.

Linux and Cryptography

Question

You work as a Network Administrator for Net World Inc. The company has a Linux-based network. For testing purposes, you have configured a default IP-table with several filtering rules. You want to reconfigure the table. For this, you decide to remove the rules from all the chains in the table. Which of the following commands will you use?

Options

  • AIPTABLES -D
  • BIPTABLES -A
  • CIPTABLES -h
  • DIPTABLES -F

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    5% (1)
  • C
    18% (4)
  • D
    73% (16)

Why each option

The iptables -F (flush) command removes all rules from every chain in the specified table, effectively resetting the filtering ruleset.

AIPTABLES -D

The -D flag deletes a single specific rule identified by its rule number or specification, not all rules from all chains.

BIPTABLES -A

The -A flag appends a new rule to the end of a specified chain and does not remove any existing rules.

CIPTABLES -h

The -h flag displays the iptables help and usage information and performs no modification to the table.

DIPTABLES -FCorrect

The -F flag stands for 'flush' and clears all rules from all chains in the active iptables table. When no specific chain is named, it flushes every chain (INPUT, OUTPUT, FORWARD, etc.) in the table, which is the appropriate action when reconfiguring from scratch.

Concept tested: Linux iptables flush command for clearing rules

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

Topics

#iptables#firewall rules#Linux networking#packet filtering

Community Discussion

No community discussion yet for this question.

Full GSEC Practice