To flush a Single Chain
To flush a specific chain, which will delete all of the rules in the chain, you may use the -F
, or the equivalent --flush
, option and the name of the chain to flush.
For example, to delete all of the rules in the INPUT
chain, run this command:
- sudo iptables -F INPUT
To flush All Chains
To flush all chains, which will delete all of the firewall rules, you may use the -F
, or the equivalent --flush
, option by itself:
- sudo iptables -F
If you already added a Firewall program like CSF you would want to use the CSF command to flush the block which is:
- csf -f