All of lore.kernel.org
 help / color / mirror / Atom feed
* ip sets add remove
@ 2025-02-24  8:56 Vaidas M
  0 siblings, 0 replies; only message in thread
From: Vaidas M @ 2025-02-24  8:56 UTC (permalink / raw)
  To: netfilter-devel

I created a set of ips:
#!/bin/bash
NFT=/usr/sbin/nft
$NFT add set inet filter ALLOWIPS { type ipv4_addr \; flags constant,
interval \; }.
$NFT flush set inet filter ALLOWIPS
$NFT add element inet filter ALLOWIPS { 172.17.0.0/24 }
$NFT add element inet filter ALLOWIPS { 192.168.0.0/24 }
$NFT add element inet filter ALLOWIPS { 192.168.1.58 }
$NFT add element inet filter ALLOWIPS { 192.168.1.89 }
$NFT add element inet filter ALLOWIPS { 192.168.1.125 }
$NFT add element inet filter ALLOWIPS { 192.168.1.179 }
$NFT add element inet filter ALLOWIPS { 192.168.1.212 }

Then I use this set
# nft add rule inet filter input iifname int1 ip daddr 8.8.8.8  ip saddr
@ALLOWIPS accept

But when I try to remove / add ips I get:
# nft add element inet filter ALLOWIPS { 192.168.1.58 }
Error: Could not process rule: Device or resource busy
add element inet filter ALLOWIPS { 192.168.1.58 }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# nft flush set inet filter ALLOWIPS
Error: Could not process rule: Device or resource busy
flush set inet filter ALLOWIPS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Why?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-24  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24  8:56 ip sets add remove Vaidas M

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.