Detect the correct ip to connect to a remote n2n network