On Sun, Mar 8, 2026 at 11:18 AM Roger Price <[email protected]> wrote:
> I run Debian 13 with the network configuration managed by NetworkManager.
> I
> would like to change the DNS server.
>
> Command dig debian.net currently reports
>
> ;; SERVER: 10.218.0.1#53(10.218.0.1) (UDP)
>
> I would like to use 1.1.1.1 as my DNS server so I defined file
> /etc/NetworkManager/conf.d/DNS.conf
>
> # Use Cloudfare DNS instead of ISP's DNS
> [ipv4]
> dns=1.1.1.1;1.0.0.1;
> [ipv6]
> dns=2606:4700:4700::1111;2606:4700:4700::1001;
>
> But command /sbin/NetworkManager --print-config now reports (comments
> removed)
>
> [main]
> plugins=ifupdown,keyfile
> configure-and-quit=no
>
> [ifupdown]
> managed=false
>
> [ipv4]
> dns=1.1.1.1;1.0.0.1;
>
> [ipv6]
> dns=2606:4700:4700::1111;2606:4700:4700::1001;
>
> [logging]
> [device]
> [device-31-mac-addr-change]
> match-device=driver:eagle_sdio,driver:wl
> wifi.scan-rand-mac-address=no
>
> # WARNING: unknown key 'dns' in section [ipv4] of file
> '/etc/NetworkManager/conf.d/DNS.conf'
> # WARNING: unknown key 'dns' in section [ipv6] of file
> '/etc/NetworkManager/conf.d/DNS.conf'
>
> The key 'dns' is invalid in conf.d . What key should I use ?
>
According to Google:
In networkd files, DNS= should typically reside under
the [Network] section, not [IPv4].
> I tried directly modifying the files in
> /etc/NetworkManager/system-connections/
> using nm-connection-editor following
>
> https://wiki.debian.org/NetworkConfiguration#Defining_the_.28DNS.29_Nameservers
>
> This works for IPv4, but the WiKi does not explain IPv6 DNS, and
> nm-connection-editor does not accept cut-and-paste for IPv6 addresses.
>
> nm-connection-editor has to be run for every connection. Isn't there some
> way
> of making a global change ?
Jeff