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.
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)- A5% (1)
- B5% (1)
- C18% (4)
- D73% (16)
Why each option
The iptables -F (flush) command removes all rules from every chain in the specified table, effectively resetting the filtering ruleset.
The -D flag deletes a single specific rule identified by its rule number or specification, not all rules from all chains.
The -A flag appends a new rule to the end of a specified chain and does not remove any existing rules.
The -h flag displays the iptables help and usage information and performs no modification to the table.
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
Community Discussion
No community discussion yet for this question.