From LinuxReviews
Jump to navigationJump to search

systemd-resolved is a all-in-one name resolution manager which is somewhat tied to NetworkManager. It can act as a service for applications and resolve regular DNS, multi-cast DNS.

Configuration[edit | edit source]

systemd-resolved is configured in the file /etc/systemd/resolved.conf where the basic options are DNS=, FallbackDNS=, MulticastDNS= and DNSStubListener=

A basic example would be:

File: /etc/systemd/resolved.conf
# Resolve using Cloudflare DNS
# Fallback to Google if Cloudflare is unavailable
# Listen for multicast DNS
# respond to DNS requests on

The systemd-resolved manual has more details if the above isn't obvious enough for you.

Do note that there isn't much it can do in terms of multicast beyond resolving .local hostnames. You need to disable systemd-resolved's multicast DNS feature and use avahi-daemon for advanced uses like announcing services.

Turning it off - permanently[edit | edit source]

If you have setup your own DNS server using Unbound or something else and you do NOT want to use systemd-resolved then this is desired and required:

File: /etc/systemd/resolved.conf

You need to make sure systemd-resolved is not set to listen on with DNSStubListener=no or mDNS with MulticastDNS=no even if you have disabled it with:

systemctl disable systemd-resolved.service

It will start when certain applications make API requests to systemd when it is disabled and even when you have masked it with systemctl mask systemd-resolved.service

Disabling it in the configuration file is the only thing short of removing the binary which works if you want it disabled.