get correct IP address for server