This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Talk:Nftables

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

http://wiki.gentoo.org/wiki/Nftables#Deleting_Rules

... To delete a rule, you first need to get the handle number of the rule. This can be done by using the -a flag on nft: ...

The -a flag is not used anywere in the document, someone skilled can correct this issue

Added an example of the -a flag usage in the document. - Bergzand 14:19, 5 December 2014 (UTC)

syntax error, unexpected flush, expecting string

This line:

root #echo "nft flush ruleset" > backup.nft

should be:

root #echo "flush ruleset" > backup.nft

otherwise, this error happens:

root #$ sudo nft -f backup.nft
backup.nft:1:5-9: Error: syntax error, unexpected flush, expecting string
nft flush ruleset
    ^^^^^

But the reason that I'm not changing this myself in the page is: 1. I am running the above on non-gentoo linux (nftables v0.4, kernel 4.0.0-g39a8804) and 2. it may have changed with the new versions of nftables thus the original command may still work as expected and without error in gentoo. --EmanueLczirai (talk) 17:17, 21 April 2015 (UTC)

I'm thinking that those commands came from here https://wiki.nftables.org/wiki-nftables/index.php/Operations_at_ruleset_level#backup.2Frestore --EmanueLczirai (talk) 22:23, 21 April 2015 (UTC)
Tested on nftables-0.6-r4 and fixed as suggested Cjmayo (talk) 16:12, 19 November 2016 (UTC)