Coder Social home page Coder Social logo

Comments (5)

rpigott avatar rpigott commented on May 27, 2024

I have done a basic script at reboot to modify stub-resolver:

Don't do that. It has a big warning at the top not to edit it...

from systemd.

remyd1 avatar remyd1 commented on May 27, 2024

@rpigott yes, I know. As soon as there is another possibility, I will switch to it...

from systemd.

rpigott avatar rpigott commented on May 27, 2024

Just configure sd-resolved with the files and api that sd-resolved has. The stub-resolv.conf is only present for compat with glibc — you don't want to edit it.

from systemd.

bluca avatar bluca commented on May 27, 2024

Modifying these files manually is not supported, as mentioned use the appropriate interfaces that are available to do this.

from systemd.

remyd1 avatar remyd1 commented on May 27, 2024

FYI, I also did what you said, that is to say modifying /etc/systemd/resolved.conf instead of stub listener file directly.

It works with this basic configuration:

[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google:     8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9:      9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=1.1.1.1
#FallbackDNS=1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google
FallbackDNS=9.9.9.9
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=yes
#LLMNR=yes
#Cache=no
#CacheFromLocalhost=no
DNSStubListener=no
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
#StaleRetentionSec=

But if I change DNSStubListener=no , to DNSStubListener=yes and then restart systemd-resolved, it does not work anymore with the same issue as described above. I also tried udp and tcp for this option; it does not work either. Did I miss something ?

from systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.