try to use public ip if possible