Linux Netfilter discussions
 help / color / mirror / Atom feed
* ipset save and restore
@ 2012-12-19 14:53 Christoph Anton Mitterer
  2012-12-19 21:01 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Anton Mitterer @ 2012-12-19 14:53 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

Hi.

I wanted to use ipset (ipset v6.11, protocol version: 6) to load it's
sets from a cluster wide distributed file, e.g. at boot, or every time
that file changes.


Now unfortunately it seems that ipset restore doesn't work as e.g.
iptables restore does and seems to me therefore pretty much useless.

ipset restore < file
gives me errors about the sets already existing, but even with -exist it
doesn't help a lot, because entries removed from the file, are not
removed from the actual ipsets.

So it seems as if ipset restore is not what the manpage describes
(restore a session) but rather an additive merge of another session to
the current one.

Of course I understand that it could not delete sets which are in use,
but at least it could empty them.


Now when I use the following instead:
ipset flush
ipset destroy
ipset restore < file

To first flush all entries possibly no longer in the current version of
file and to destroy all sets that got removed and that are no longer
used... and only then reload the rules.... I have of course some time
where even the sets that are in use are empty... and my connections will
fail.


So is there some workaround or who is the whole thing intended to be
used?


Thanks,
Chris.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3811 bytes --]

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

end of thread, other threads:[~2012-12-20 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 14:53 ipset save and restore Christoph Anton Mitterer
2012-12-19 21:01 ` Jozsef Kadlecsik
2012-12-19 22:23   ` Christoph Anton Mitterer
2012-12-19 23:24     ` Jozsef Kadlecsik
2012-12-20  0:23       ` Christoph Anton Mitterer
2012-12-20 12:00         ` Jozsef Kadlecsik
2012-12-20 16:12           ` Christoph Anton Mitterer
2012-12-20 19:12             ` Jozsef Kadlecsik

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