3

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.

2 Answers 2

4

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.

0
2

To flush the entire ruleset, including all tables and chains in one go.

$ nft flush ruleset
1
  • 3
    Welcome to Serverfault! We have two kind of citation methods. The one starting with > 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .