Comment

Comment by 1718627440

I know this is not what you want, but actually:

   $ apropos dns
   [...]
   resolvectl (1)       - Resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services; introspect and reconfigure the DNS resolver
   [...]
   $ man resolvectl
   [...]
     dns [LINK [SERVER...]], domain [LINK [DOMAIN...]], default-route [LINK [BOOL...]], llmnr [LINK [MODE]], mdns [LINK [MODE]], dnssec [LINK [MODE]], dnsovertls [LINK [MODE]], nta [LINK [DOMAIN...]]

           Get/set per-interface DNS configuration. These commands may be used
           to configure various DNS settings for network interfaces. These
           commands may be used to inform systemd-resolved or systemd-networkd
           about per-interface DNS configuration determined through external
           means. The dns command expects IPv4 or IPv6 address specifications
           of DNS servers to use. Each address can optionally take a port
           number separated with ":", a network interface name or index
           separated with "%", and a Server Name Indication (SNI) separated
           with "#". When IPv6 address is specified with a port number, then
           the address must be in the square brackets. That is, the acceptable
           full formats are "111.222.333.444:9953%ifname#example.com" for IPv4
           and "[1111:2222::3333]:9953%ifname#example.com" for IPv6. The
           domain command expects valid DNS domains, possibly prefixed with
           "~", and configures a per-interface search or route-only domain.
           The default-route command expects a boolean parameter, and
           configures whether the link may be used as default route for DNS
           lookups, i.e. if it is suitable for lookups on domains no other
           link explicitly is configured for. The llmnr, mdns, dnssec and
           dnsovertls commands may be used to configure the per-interface
           LLMNR, MulticastDNS, DNSSEC and DNSOverTLS settings. Finally, nta
           command may be used to configure additional per-interface DNSSEC
           NTA domains.

           Commands dns, domain and nta can take a single empty string
           argument to clear their respective value lists.

           For details about these settings, their possible values and their
           effect, see the corresponding settings in systemd.network(5).


   [...]
Not too bad in my opinion. (I didn't actually knew before how to set the DNS server, never needed to do it.)
parent 1718627440 23 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton