getting the right ip address on server