I'm using a VPN client which adds two name servers to /etc/resolv.conf
. All my connections are managed by Network-Manager.
I have to use this VPN client for my work VPN but after Ubuntu went to systemd-resolved
in 16.10 I am having problems with my connection and DNS. Looks like systemd-resolved
changes /etc/resolv.conf
back to default name servers for some reason which makes internal pages not resolve. I looked into this some more and ended up replacing resolvconf
with openresolv
. That helped a lot, but still systemd-resolved
resets /etc/resolv.conf
after the VPN has been up for a while.
It could be just as the connection is up or after a few minutes or sometimes not at all. I then disabled systemd-resolved
and the systemd resolvconf.service
and only run openresolv
. It all works well it seems.
However, this is all very confusing. Is there a reason for using systemd-resolved
with one of the others? It was enabled in Ubuntu 16.10 so I thought there must be a reason for it but it seems to cause a fight over /etc/resolv.conf
.
It would be great if I could just run operesolv
and get this explained. I have done quite a bit of reading on it but I still do not understand why /etc/resolv.conf
is managed like it is, only that when I use systemd
for it I can't use my VPN client.
/run/systemd/resolve/resolv.conf
file. You might want to try having systemd-networkd manage your connections.