use private IP automatically if no public IP is assigned