938
Do you like systemd? (discuss.tchncs.de)
you are viewing a single comment's thread
view the rest of the comments
[-] tal@olio.cafe 3 points 3 days ago

DNS

There's systemd-resolved. I don't know if you mean that it has some kind of limitation.

[-] Dhar@lemmy.ca 1 points 2 days ago

It doesn't work with private DNS servers or forward DNS over VPN. Removing it is always the first thing I have to do with new Linux installs.

[-] tal@olio.cafe 1 points 2 days ago

It doesn’t work with private DNS servers or forward DNS over VPN.

Like, you want to have it query some particular DNS server?

From man 5 resolved.conf:

   DNS=
       A space-separated list of IPv4 and IPv6 addresses to
       use as system DNS servers. 

       For compatibility reasons, if
       this setting is not specified, the DNS servers listed
       in /etc/resolv.conf are used instead, if that file
       exists and any servers are configured in it.

If you specify your private server there, it should work. For VPN, I mean, whatever VPN software you're using will need to plonk it in there. Maybe yours is not aware of systemd-resolved, is modifying /etc/resolv.conf after systemd-resolved has already started, and it doesn't watch it for updates?

In my /etc/nsswitch.conf, I have:

hosts:          files myhostname mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns

I'm assuming that the "resolve" entry is for systemd-resolved.

kagis

https://www.procustodibus.com/blog/2022/03/wireguard-dns-config-for-systemd/

With systemd-resolved, however, instead of using that DNS setting, add the following PostUp command to the [Interface] section of your WireGuard config file:

PostUp = resolvectl dns %i 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net; resolvectl domain %i ~.

When you start your WireGuard interface up, this command will direct systemd-resolved to use the DNS server at 9.9.9.9 (or at 149.112.112.112, if 9.9.9.9 is not available) to resolve queries for any domain name.

this post was submitted on 08 Oct 2025
938 points (100.0% liked)

linuxmemes

27619 readers
17 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS