Skip to contentSkip to conversation

IPSet target SET subnet options

DISCUSSION WaaX 2 participants 2 messages Jun 27, 2015 netfilter

lore
Share & tools
lore

WaaX

author
#0 lore raw

Hi,
I hve explored the manual of SETtarget:

SET target options:
--add-set name flags [--exist] [--timeout n] --del-set name flags
add/del src/dst IP/port from/to named sets,
where flags are the comma separated list of 'src' and 'dst' specifications.

I can not find solution for add a subnet mask to a hash:net with the target.

Thanks for reading.

#1 lore raw
Quoted 10 lines · WaaX

I hve explored the manual of SETtarget:

SET target options:
--add-set name flags [--exist] [--timeout n] --del-set name flags
add/del src/dst IP/port from/to named sets,
where flags are the comma separated list of 'src' and 'dst' specifications.

I can not find solution for add a subnet mask to a hash:net with the target.

It is documented in the ipset manpage:

hash:net
....

When adding/deleting IP addresses to the set by the SET netfilter
target, it will be added/deleted by the most specific prefix which
can be found in the set, or by the host prefix value if the set is empty.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences

          H-1525 Budapest 114, POB. 49, Hungary