Closed joshcangit closed 2 years ago
After disabling systemd-resolved
, who or what is managing /etc/resolv.conf
? From the comments it doesn't appear to be you, or at least you haven't explicitly mentioned it.
In my experience it's easiest to just delete and recreate resolv.conf
manually after disabling the service.
I myself run several parallel instances of dnsproxy
via a service of my own construction and I can't say I can reproduce your issue.
After disabling
systemd-resolved
, who or what is managing/etc/resolv.conf
? From the comments it doesn't appear to be you, or at least you haven't explicitly mentioned it.
I'm using Ubuntu.
/etc/resolv.conf
is managed by resolvconf
.
I'm using Ubuntu as well.
Is your resolv.conf
actually valid? The resolvconf
service should leave resolv.conf alone if it's been manually created.
Once in a blue moon during a dist-upgrade
it catches me out and my resolv.conf gets recreated (forgetting to mask the systemd-resolved service, and other shenanigans), but it's otherwise solid. I don't need/want any service to dynamically create resolv.conf, hence deleting it and creating my own.
I now found out how this doesn't work.
systemd-resolved
uses 127.0.0.53
.
It adds this line to /etc/resolv.conf
.
nameserver 127.0.0.53
So for dnsproxy
, it needs to add a line with nameserver
to /etc/resolv.conf
for any listen address it uses.
This
dnsproxy
needs to listen addresses to work but can't because ifsystem-resolved.service
is enabled,dnsproxy
will have bind: permission denied. If I disablesystemd-resolved.service
,dnsproxy
will then run.But after boot up or reboot, DNS is gone. No URLs will work. This
dnsproxy
cannot initiate DNS resolution on boot up butsystemd-resolved
can. No, I have already setbootstrap
addresses and enabledcache
, still the same problem.This bug is very difficult to describe. I hope this bug will get a fix eventually.
Temporary fix
dnsproxy.service
so I had to disable that.systemd-resolved.service
.systemd-resolved.service
again.dnsproxy.service
after that.Finally, it looks like it works but after reboot or power off then power on, it comes back again every time.