No, you need to create a separate type of ipset, nethash, to be able to handle CIDR addresses.I use:
ipset --add setmeok 91.108.56.0/22
and I can't find it from the ip list via command
ipset -L setmeok
is something wrong?
No, you need to create a separate type of ipset, nethash, to be able to handle CIDR addresses.
What router and what firmware level? (It makes a difference)how to ? could you tell me ..thank you
What router and what firmware level? (It makes a difference)
That firmware still uses ipset version 4, so.....
You need to create an ipset that handles CIDR address (unfortunately you can't mix single addresses and CIDR addresses in a single set, and trying to fake it out with a /32 mask doesn't work either). The set type is nethash. You may need to modprobe ip_set_nethash if you already aren't doing so.
ipset -N newsetname nethash
Then add your CIDR addresses to this new ipset.
Now, in order to keep from having to add a new ipset to your iptables rules, you can join multiple ipsets under a new set name. First create another ipset that is a list of ipsets
ipset -N ipsetlistname setlist
Now add your ipsets to the setlist
ipset --add ipsetlistname newsetname
ipset --add ipsetlistname setmeok (using your old ipset as an example. You could of course make two new ipsets , and make the ipsetlistname = setmeok to avoid having to change your iptables rules).
Note that you still have to add individual ips/CIDRs to the base ipsets, not the setlist.
No, sorry....same restrictions/methodology applies. But the syntax has changed (although I think it's backwards compatible, except for the module names)how about upgrade my router to 380.63?
I saw it has ipset 6.29, so can I use "ipset --add setmefree 91.108.56.0/22" directly?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!