Linux Netfilter discussions
 help / color / mirror / Atom feed
* Automatically maintaining unique list of addresses
@ 2020-02-19  7:44 Lars Noodén
  2020-02-19 11:01 ` pauloric
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Noodén @ 2020-02-19  7:44 UTC (permalink / raw)
  To: Linux Netfilter Users List

If I add an IP address multiple times, I end up with it in the ruleset
three times.  Is there an easy way to try to add IP addresses such that
they aren't duplicated?

/Lars

$ sudo nft add rule ip filter4 input ip \
	saddr 198.51.100.209 counter reject

$ sudo nft add rule ip filter4 input ip \
	saddr 198.51.100.209 counter reject

$ sudo nft add rule ip filter4 input ip \
	saddr 198.51.100.209 counter reject

$ sudo nft list ruleset| grep 51
                ip saddr 198.51.100.209 counter packets 0 bytes 0 reject
                ip saddr 198.51.100.209 counter packets 0 bytes 0 reject
                ip saddr 198.51.100.209 counter packets 0 bytes 0 reject

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

end of thread, other threads:[~2020-02-19 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-19  7:44 Automatically maintaining unique list of addresses Lars Noodén
2020-02-19 11:01 ` pauloric
2020-02-19 11:39   ` Lars Noodén

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox