You are not logged in.

#1 2019-01-08 09:40:26

xse
Member
Registered: 2019-01-08
Posts: 1

[FIXED] [nftables] Remove all elements from a given set

Hello,

I'm trying to remove all elements from a given set in my firewall, obviously, it's not working.



root@krkrkr ~ # nft list set inet filter blackhole
table inet filter {
        set blackhole {
                type ipv4_addr
                elements = { 42.42.42.42, 43.43.43.43 }
        }
}
root@krkrkr ~ # nft flush set inet filter blackhole
Error: Could not process rule: Invalid argument
flush set inet filter blackhole
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 root@krkrkr ~ #

Here is what the manual says about what i'm trying to do :
X2XUsu4.png

To me it seems like i can use flush the same way i use list.
I'm kinda lost here, anyone have an idea or is able to reproduce that ?
Have a good day !



EDIT : fixed, bad kernel version.

Last edited by xse (2019-01-08 10:30:10)

Offline

Board footer

Powered by FluxBB