All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use NFT inet sets???
@ 2015-10-20 10:51 sabitov
  2015-10-20 11:46 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: sabitov @ 2015-10-20 10:51 UTC (permalink / raw)
  To: netfilter

Hi!

I try to build combined ipv4 and ipv6 firewall using NFT. But I cannot 
find any working example of nft's _INET_ set usage :(

I try to do next:

/sbin/nft -i
nft> list ruleset
nft> flush ruleset
nft> list ruleset
nft> add table inet fw
nft> add chain inet fw input { type filter hook input priority 10; }
nft> add chain inet fw output { type filter hook output priority 10; }
nft> add chain inet fw forward { type filter hook forward priority 10; }
nft> add set inet fw admin_list { type inet_proto ; }
nft> add set inet fw black_list { type inet_proto ; }
nft> add rule  inet fw  input    inet saddr @black_list log drop
<cli>:1:29-32: Error: syntax error, unexpected inet
add rule  inet fw  input    inet saddr @black_list log drop
                             ^^^^
nft> add rule  inet fw  input    ip saddr @black_list log drop
<cli>:1:38-48: Error: datatype mismatch, expected IPv4 address, set has 
type Internet protocol
add rule  inet fw  input    ip saddr @black_list log drop
                             ~~~~~~~~ ^^^^^^^^^^^
nft> add rule  inet fw  input    ip6 saddr @black_list log drop
<cli>:1:39-49: Error: datatype mismatch, expected IPv6 address, set has 
type Internet protocol
add rule  inet fw  input    ip6 saddr @black_list log drop
                             ~~~~~~~~~ ^^^^^^^^^^^
nft> add rule  inet fw  input saddr @black_list log drop
<cli>:1:26-30: Error: syntax error, unexpected saddr
add rule  inet fw  input saddr @black_list log drop
                          ^^^^^
nft> ^D


Is there any example how can I use nft's _INET_ set?

Thanks a lot.



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

end of thread, other threads:[~2015-10-20 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20 10:51 How to use NFT inet sets??? sabitov
2015-10-20 11:46 ` Pablo Neira Ayuso

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.