ip6tables - create a set of IPv6 address to block

Solution 1:

You’re using the wrong set type. hash:ip is for “IP host addresses” (or networks, but only of fixed prefix length). You don’t have host addresses, you have networks, possibly of varying prefix length. As such, you want to use hash:net:

$ ipset create foo hash:net family inet6
$ ipset add foo 2A03:C2C0::/32
$ ipset test foo 2A03:C2C0::123
2a03:c2c0::123 is in set foo.