Default DNS is set to 127.0.0.1, return 0.0.0.0 for domain

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)

do

nslookup 3322.org

it returns 0.0.0.0, and the script runs failure.

This is pretty simple to fix though.

  1. Install the resolvconf package.
sudo apt install resolvconf

2. Edit /etc/resolvconf/resolv.conf.d/head and add the following:

# Make edits to /etc/resolvconf/resolv.conf.d/head.
nameserver 8.8.4.4
nameserver 8.8.8.8

3. Restart the resolvconf service.

sudo service resolvconf restart

seems not working.

server can’t find example.com: REFUSED

check if

cat /etc/NetworkManager/NetworkManager.conf

serv[main]
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
hash(#) out dns=dnsmasq

save the file and restart networking.

sudo vi/etc/NetworkManager/NetworkManager.conf

and comment out the following line from

dns=dnsmasq

to

#dns=dnsmasq

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

13:IP4.DNS[1]: 8.8.8.8
14:IP4.DNS[2]: 8.8.4.4

Written by

自由撰稿人,时评人,平等公义追求者

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store