How can I check if an IP address is in a given subnet? I was able to do this by using Apache Commons SubnetUtils (SubnetUtils.SubnetInfo.isInRange) but it does not support IPv6 yet.
edazdarevic's CIDRUtils supports both IPv4 and IPv6. The example does not mention boolean isInRange(String ipAddress), but it is implemented!
Another option is java-ipv6, but it does not support IPv4 and requires JDK7.