Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
Uh, completely missed that in docs. Thanks! –  exa May 14 at 18:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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