get list of IPv4 and IPv6 addresses, brackets around IPv6