XK0-005 · Question #333
An administrator received a request from a security officer to eliminate a blacklisting set called internal-blocked the company is using in the iptables firewall. Which of the following commands…
The correct answer is B. ipset destroy internal-blocked. To completely remove an existing ipset set from the system, including all its associated entries, the ipset destroy command must be used.
Question
An administrator received a request from a security officer to eliminate a blacklisting set called internal-blocked the company is using in the iptables firewall. Which of the following commands will complete the task?
Options
- Aipset swap internal-blocked none
- Bipset destroy internal-blocked
- Cipset del internal-blocked
- Dipset remove internal-blocked
How the community answered
(28 responses)- A4% (1)
- B93% (26)
- D4% (1)
Why each option
To completely remove an existing ipset set from the system, including all its associated entries, the ipset destroy command must be used.
ipset swap replaces the contents of one set with another or an empty set, but it does not destroy the original set from the system.
The ipset destroy internal-blocked command permanently removes the entire ipset set named internal-blocked from the kernel. This command frees up the memory used by the set and its entries, effectively eliminating it from the firewall's active configuration and making it unavailable for iptables rules.
ipset del is used to remove a specific entry (like an IP address or network) from a set, not to delete the set itself.
ipset remove is not a standard ipset command for deleting an entire set; del is used for entries, and destroy for the set itself.
Concept tested: iptables ipset management
Source: https://man7.org/linux/man-pages/man8/ipset.8.html
Topics
Community Discussion
No community discussion yet for this question.