if master_ip not defined, use current public ip