Added auto external IP detection