Method to get local ip