Skip to contentSkip to conversation

ipset can't load -N and -A separately

DISCUSSION Badalian Vyacheslav 2 participants 3 messages Apr 6, 2009 netfilter

lore
Share & tools
lore
#0 lore raw

Hello.

If i try generate restore file its can't load first all -N and then all -A fileds.
If we do s/^/ipset / its normal load all rules.

Gzipped example file in attach.
Simple try to load it by ipset --resore <
I try ipset v2.5.0.

Thanks!

#1 lore raw
Quoted 3 lines · Badalian Vyacheslav

If i try generate restore file its can't load first all -N and then all -A fileds.
If we do s/^/ipset / its normal load all rules.

That's the normal and documented behaviour, see 'man ipset'. In a restore script you must create a set, add all its elements, then create the next set, add all of those elements and so on.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary
#2 lore raw

Oh... Thanks!

Quoted 21 lines · Badalian Vyacheslav
Quoted 6 lines

If i try generate restore file its can't load first all -N and then all -A fileds.
If we do s/^/ipset / its normal load all rules.

That's the normal and documented behaviour, see 'man ipset'. In a restore script you must create a set, add all its elements, then create the next set, add all of those elements and so on.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary