Improved private IPv4 and IPv6 detection