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.

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. – Esa Jokinen Aug 13 '17 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.