How can an internet connection be tested without pinging some website? I mean, what if there is a connection but the site is down? Is there a check for a connection with the
make sure your network allow TCP traffic in and out, then you could get back your public facing IP with the following command
curl ifconfig.co