Validating the IP address with the socket package