Just after Ubuntu upgrade to 20.04 /etc/resolv.conf
contains:
nameserver 127.0.2.1
and it does not work. It works after changing to:
nameserver 127.0.0.53
But it is overridden after each restart and I have to change it all over again.
I have installed Ubuntu 15.10 in this box, upgrading it regularly and it is first time resolver misbehaving like this. Naughty!
How to fix this permanently?
Edit:
Output of $ ls -al /etc/resolv.conf
:
lrwxrwxrwx 1 root root 29 lis 1 2015 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
Content of /etc/resolv.conf
:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search wroclaw.vectranet.pl
(It used to be nameserver 127.0.2.1
after restart, but without changing to 127.0.0.53
I would not be able to write this post ;).)
Content of /etc/hosts
:
127.0.0.1 localhost
127.0.1.1 marcin-Lenovo
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#188.165.239.159 wkaliszu.pl
#10.10.9.157 mskorzewski.axit.pl
X.X.X.X mskorzewski.axit.pl
(X.X.X.X
is some real IP address.)
ls -al /etc/resolv.conf
andcat /etc/resolv.conf
andcat /etc/hosts
. – heynnema May 24 '20 at 14:12/etc/netplan
– Marcin Skórzewski May 25 '20 at 06:23