sudo apt update
sudo apt upgrade

ip a
ip a show eth0

dig +short
dig TXT +short | awk -F'"' '{ print $2}'
wget -O
chmod +x

sudo ./

Sample session from AWS/Lightsail where my cloud server is behind NAT:

Sample session from Linode/DO server where cloud server has Direct Public

To avoid problem always choose DNS as or Google DNS. Those are fast DNS server and reached from anywhere on the Internet.