On 4/20/19 3:36 AM, Pierre Labastie via blfs-support wrote:
Writing to -support, because I am very newbie to systemd.
On the systemd book, both for bind and unbound, there is an instruction to
modify the /etc/resolv.conf file, such as:
# unbound
echo "nameserver 127.0.0.1" > /etc/resolv.conf
# bind
cat > /etc/resolv.conf << "EOF"
search <yourdomain.com>
nameserver 127.0.0.1
EOF
But if /etc/resolv.conf is a symlink (as advised in the LFS book), this will
write to the symlinked file, not recreate /etc/resolv.conf as a regular file.
So I think those settings would be lost at next reboot...
Also, it is advised to do:
# bind
systemctl start named
but not for unbound.
Shouldn't systemd-resolved be stopped and disabled first?
And actually, isn't systemd-resolved enough, and do we need bind or unbound?
Pierre
Generally what I do is disable systemd-resolved, run a 'rm -f
/etc/resolv.conf', and then create a static one. I had to do this
recently after Comcast's upstream DNS services went down for two days in
my area (actually the whole Chicago-land area - their official guidance
was (for Windows only) set the DNS servers to 8.8.4.4 and 8.8.8.8), and
I just setup a BIND server instead. It has been a while since I've
tested this configuration in a production environment though, this was
just a quick hack to bypass an upstream DNS problem.
I have only ever tested/used Unbound once, and that was when I took over
systemd in July of 2015. systemd-resolved should be enough in most
cases, unless you need a DNS server - that's where BIND comes in :-)
Similar to unbound, systemd-resolved also caches requests.
This is a rather low priority suggestion, but I think we should add
instructions about removing the symlinked /etc/resolv.conf file to BIND
and Unbound's page, and then disabling systemd-resolved, to prevent
confusion for users.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page