default dns was set to 127.0.0.1 by some reason.
it cannot resolve address when running
wget -qO- -4 -t1 -T2 members.3322.org/dyndns/getip)
it returns 0.0.0.0, and the script runs failure.
This is pretty simple to fix though.
- Install the
sudo apt install resolvconf
/etc/resolvconf/resolv.conf.d/head and add the following:
# Make edits to /etc/resolvconf/resolv.conf.d/head.
3. Restart the
sudo service resolvconf restart
seems not working.
server can’t find example.com: REFUSED
hash(#) out dns=dnsmasq
save the file and restart networking.
and comment out the following line from
Save and exit the file
Now you need to network-manager using the following command
sudo service network-manager restart
and then you can run:
nmcli device show <interfacename> | grep IP4.DNS