Automatically maintaining unique list of addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux