validating ipv4/ipv6 for reverse lookup