utility method to get remote ip