Make sure to strip spaces around IP addresses