All of lore.kernel.org
 help / color / mirror / Atom feed
* nftables: named set for ipv4 networks
@ 2016-10-23 19:38 Leon Merten Lohse
  2016-10-27 19:23 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 8+ messages in thread
From: Leon Merten Lohse @ 2016-10-23 19:38 UTC (permalink / raw)
  To: netfilter

Hi,

is there a way to migrate a hash:net type ipset to nftables?
We use this to implement a blacklist where we block a large number of
networks.

I tried using a type ipv4_addr named set as follows:

flush ruleset
table inet filter {
  set blacklist_v4 { type ipv4_addr; }
}
add element inet filter blacklist_v4 { 10.0.0.0/8 }

However, this results in:
Error: Set member cannot be prefix, missing interval flag on declaration
add element inet filter blacklist_v4 { 10.0.0.0/8 }
                                       ^^^^^^^^^^
Is ipv4_addr the wrong type in this case? I could not find any
documentation on it.
Using networks in anonymous sets seems to work flawlessly.

Best,
Leon

System:
# nft --version
nftables v0.6 (Support Edward Snowden)
# uname -a
Linux maracuja 4.7.0-0.bpo.1-amd64 #1 SMP Debian 4.7.5-1~bpo8+2
(2016-10-01) x86_64 GNU/Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-29 23:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-23 19:38 nftables: named set for ipv4 networks Leon Merten Lohse
2016-10-27 19:23 ` Pablo Neira Ayuso
2016-10-27 21:41   ` Leon Merten Lohse
2016-10-28  8:04     ` Pablo Neira Ayuso
2016-10-28 14:23       ` Leon Merten Lohse
2016-11-02 10:30         ` Leon Merten Lohse
2016-11-03 11:29           ` Arturo Borrero Gonzalez
2016-11-29 23:00             ` Leon Merten Lohse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.