Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNSStubListener=no should update a dynamic resolv.conf automatically #14700

Closed
EdoaLive opened this issue Jan 30, 2020 · 5 comments
Closed

DNSStubListener=no should update a dynamic resolv.conf automatically #14700

EdoaLive opened this issue Jan 30, 2020 · 5 comments
Assignees
Labels
resolve RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@EdoaLive
Copy link

The systemd-resolved.service man page suggests to symlink /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf.
That is of my preferred course of action because systemd-resolved will handle a lot more than single DNS servers listed in /run/systemd/resolve/resolv.conf, like LLMNR or other internal configurations.

But if I set DNSStubListener=no for whatever reason, the whole name resolution stops working (unless another recursive DNS server is running in the local machine).
I (maybe stupidly) expected that, as /run/systemd/resolve/stub-resolv.conf is said to be kept up to date, its content would mirror /run/systemd/resolve/resolv.conf if the option DNSStubListener=no is set.
Otherwise, the admin has to change the /etc/resolv.conf symlink every time I change the DNSStubListener option.

Am I saying something so strange?

@yuwata yuwata added resolve RFE 🎁 Request for Enhancement, i.e. a feature request labels Jan 30, 2020
@gwik
Copy link

gwik commented Mar 25, 2020

Same issue here. I would have expected that setting DNSStubListener=no would and DNS=8.8.4.4
would update /etc/resolv.conf to

nameserver 8.8.4.4

But it still point to the stub resolver.

/etc/resolv.conf -> ../run/resolvconf/resolv.conf

@keszybz keszybz self-assigned this Apr 20, 2020
@allir
Copy link

allir commented Apr 20, 2020

Same issue here too. Setting the DNSStubListener=no feels like it should automatically update the symlink on service start as well as otherwise it breaks DNS resolution without manual intervention.

@nemihome
Copy link

Same issue here,

@Ajedi32
Copy link

Ajedi32 commented Feb 20, 2022

Just ran into this problem myself on a brand new Ubuntu install and was confused because according to this issue the problem was fixed almost two years ago now. Apparently Ubuntu 20 LTS is still using systemd v245 though, and this fix was included in v246. So... yeah. Kinda crazy how long it takes for bug fixes to make it into downstream distros.

For now, you can fix it by running ln --symbolic --force /run/systemd/resolve/resolv.conf /etc/resolv.conf after setting DNSStubListener=no to manually update the symlink.

@josel82
Copy link

josel82 commented Sep 21, 2023

Thanks @Ajedi32 that fixed the issue in my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolve RFE 🎁 Request for Enhancement, i.e. a feature request
Development

No branches or pull requests

8 participants