Simply, is there any quick alternative of iptables -F
command (that just "deletes everything") for nftables?
Such thing wouldn't have much theoretical purposes, but it's usually a lifesaver for administration of bad/gone-wrong setups.
Simply, is there any quick alternative of iptables -F
command (that just "deletes everything") for nftables?
Such thing wouldn't have much theoretical purposes, but it's usually a lifesaver for administration of bad/gone-wrong setups.
I believe you are looking for nft flush
commmand. The syntax is:
$ nft flush table <name>
You can also flush chain:
$ nft flush chain <table> <name>
Alternatively you can always use nft delete rule
command to delete any rules that you have just applied.
To flush the entire ruleset, including all tables and chains in one go.
$ nft flush ruleset