summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-09-12 21:16:34 +0200
committerThomas Haller <thaller@redhat.com>2018-09-21 11:12:47 +0200
commit0dc673f0a5f6ee3fdba52e8bf882d67c5b888baa (patch)
tree680077063fd5fbb5bd19949a177cee4f88abfa4e /man
parent95b006c244978fecec9463690477e8b64f743202 (diff)
dns: write original DNS servers to /var/run/NetworkManager/no-stub-resolv.conf
When a DNS plugin is enabled (like "main.dns=dnsmasq" or "main.dns=systemd-resolved"), the name servers announced to the rc-manager are coerced to be 127.0.0.1 or 127.0.0.53. Depending on the "main.rc-manager" setting, also "/etc/resolv.conf" contains only this coerced name server to the local caching service. The same is true for "/var/run/NetworkManager/resolv.conf" file, which contains what we would write to "/etc/resolv.conf" (depending on the "main.rc-manager" configuration). Write a new file "/var/run/NetworkManager/no-stub-resolv.conf", which contains the original name servers, uncoerced. Like "/var/run/NetworkManager/resolv.conf", this file is always written. The effect is, when one enables "main.dns=systemd-resolved", then there is still a file "no-stub-resolv.conf" with the same content as with "main.dns=default". The no-stub-resolv.conf may be a possible solution, when a user wants NetworkManager to update systemd-resolved, but still have a regular /etc/resolv.conf [1]. For that, the user could configure [main] dns=systemd-resolved rc-manager=unmanaged and symlink "/etc/resolv.conf" to "/var/run/NetworkManager/no-stub-resolv.conf". This is not necessarily the only solution for the problem and does not preclude options for updating systemd-resolved in combination with other DNS plugins. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/20
Diffstat (limited to 'man')
-rw-r--r--man/NetworkManager.conf.xml12
1 files changed, 10 insertions, 2 deletions
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
index 87cf001621..4ed554ef20 100644
--- a/man/NetworkManager.conf.xml
+++ b/man/NetworkManager.conf.xml
@@ -331,15 +331,23 @@ no-auto-default=*
after some time. This behavior can be modified passing the
'all-servers' or 'strict-order' options to dnsmasq (see the
manual page for more details).</para>
+ <para><literal>systemd-resolved</literal>: NetworkManager will
+ push the DNS configuration to systemd-resolved</para>
<para><literal>unbound</literal>: NetworkManager will talk
to unbound and dnssec-triggerd, providing a "split DNS"
configuration with DNSSEC support. <filename>/etc/resolv.conf</filename>
will be managed by dnssec-trigger daemon.</para>
- <para><literal>systemd-resolved</literal>: NetworkManager will
- push the DNS configuration to systemd-resolved</para>
<para><literal>none</literal>: NetworkManager will not
modify resolv.conf. This implies
<literal>rc-manager</literal>&nbsp;<literal>unmanaged</literal></para>
+
+ <para>Note that the plugins <literal>dnsmasq</literal>, <literal>systemd-resolved</literal>
+ and <literal>unbound</literal> are caching local nameservers.
+ Hence, when NetworkManager writes <filename>&nmrundir;/resolv.conf</filename>
+ and <filename>/etc/resolv.conf</filename> (according to <literal>rc-manager</literal>
+ setting below), the name server there will be localhost only.
+ NetworkManager also writes a file <filename>&nmrundir;/no-stub-resolv.conf</filename>
+ that contains the original name servers pushed to the DNS plugin.</para>
</listitem>
</varlistentry>