dotfiles/root/etc/NetworkManager/conf.d/ignore-auto-dns.conf
2026-03-11 15:00:19 +01:00

24 lines
1.1 KiB
Text

# Ignore DNS servers advertised by networks (e.g. via DHCP).
#
# When enabled, NetworkManager will not automatically accept DNS servers provided
# by the network. Instead the system will continue using DNS servers configured
# globally (for example via systemd-resolved).
#
# This is useful when you want to enforce a specific DNS provider such as Quad9
# or Cloudflare regardless of the network you connect to. This is generally a much
# better choice for privacy, as the advertised DNS providers from the network can
# often lead to local DNS servers which the network admin can monitor for activity
# tracking.
#
# WARNING:
# Some environments rely on DHCP-provided DNS for internal name resolution (corporate
# networks, captive portals, VPNs). Enabling this globally may break such environments
# unless the connection overrides the setting.
#
# Per-connection override example:
# nmcli connection modify <connection> ipv4.ignore-auto-dns no
# nmcli connection modify <connection> ipv6.ignore-auto-dns no
[connection]
ipv4.ignore-auto-dns=true
ipv6.ignore-auto-dns=true