Skip to content

systemd-resolved: Global DNS configuration API #33754

@pemensik

Description

@pemensik

Component

systemd-resolved

Is your feature request related to a problem? Please describe

I would like to have external specification of global DNS over TLS configuration, which I want to use for any connection and any wireless network. I would like to have a way to set it from Network Manager, in similar way to VPN.

I can already set DNS, DNSOverTLS and other parameters. But it is not possible to set similar values from trusted services. NM would be good example. It could have multiple possible DNS configured, but only one active. But it has no way to tell them to resolved. It seems only file source is possible for global parameters or defaults.

Describe the solution you'd like

I would like to have external definitions of globally used servers possible. Stored in unsupported format or obtained from different daemon. Example might be cloud-init interaction. DNS over TLS servers might need extra parameters like remote hostname or certificate authority to use at remote side.

Similar to resolvectl dns eno0 1.1.1.1, I would like to be able to set global DNS. Both using DBus API and command line. For example resolvectl dns * 1.1.1.1.

NetworkManager can already define global DNS, athough somehow crude way:

[global-dns-domain-*]
servers=8.8.8.8#dns.google

[connection]
connection.dns-over-tls=2

But it has no way to instruct systemd-resolved to use such servers. Even if nothing better is specified in resolved.conf configuration.

Describe alternatives you've considered

  • Network Manager might override per-link configuration to always specify servers it has in [global-dns] section. But that would prevent definition of split-dns used just to reach local link servers.

The systemd version you checked that didn't have the feature you are asking for

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions