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.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityI 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
>
is for text quotes. By indenting the text with four spaces you can add a code block. I edited this for you.
Aug 13, 2017 at 8:40