All of lore.kernel.org
 help / color / mirror / Atom feed
* nftables set - network/netmask
@ 2018-01-31  7:25 hdemir
  2018-02-01  7:50 ` hdemir
  0 siblings, 1 reply; 6+ messages in thread
From: hdemir @ 2018-01-31  7:25 UTC (permalink / raw)
  To: netfilter

Hi,


I am trying to translate ipset to nftables; I could not add networks as
below; How can I add block IP addresses to the set. Am I missing
something? If not is it possible to add this function.

-------------------------
add table filter
        add set filter whitelist2 { type ipv4_addr . inet_proto .
inet_service . ipv4_addr ;}
        add element filter whitelist2 { \
                10.10.1.0/24 . tcp . 25 . 10.1.1.1  comment "test", \
                10.1.1.0 . tcp . 2 . 1.1.1.1  comment "test2" \
        }



# nft -c -f abcd
abcd:4:30-30: Error: syntax error, unexpected ., expecting comma or '}'
                10.10.1.0/24 . tcp . 25 . 10.1.1.1  comment "test", \



There is no error message without this line;
-------------------
add table filter
        add set filter whitelist2 { type ipv4_addr . inet_proto .
inet_service . ipv4_addr ;}
        add element filter whitelist2 { \
                10.1.1.0 . tcp . 2 . 1.1.1.1  comment "test2" \
        }

# nft -c -f abcd
#


Thanks.

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

end of thread, other threads:[~2018-02-01 18:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  7:25 nftables set - network/netmask hdemir
2018-02-01  7:50 ` hdemir
2018-02-01 10:03   ` Arturo Borrero Gonzalez
2018-02-01 11:19     ` Pablo Neira Ayuso
2018-02-01 18:28       ` Hüsnü Demir
2018-02-01 11:19   ` 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.