I have installed the Arch Linux distribution. Arch Linux uses systemd
as a system service suite, so it also uses systemd-resolved
to resolve a DNS. I use DHCP to receive DNS servers and resolve the DNS. I needed to enable the systemd-resolved
service to automatically detect and resolve the DNS. And it works, for example, for curl
and a simple web browser, even with an empty /etc/resolv.conf
. The problem is that it doesn't work for gpg
and dnsmasq
.
GPG. Command
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv *some key*
printsgpg: keyserver search failed: Server indicated a failure
if there is no DNS specified in/etc/resolv.conf
. But if I specify some DNS server in/etc/resolv.conf
, for examplenameserver 1.1.1.1
, thengpg
would work correctly and would find the key.dnsmasq. I want to make something like a DNS forwarder. I want to start a DHCP server that will provide also DNS servers. But is it possible to detect the DNS servers automatically, not only from
/etc/resolv.conf
? To use the DNS servers that the local machine uses? The DNS that might be also received from another DHCP server, the server from which the local machine receives an IPv4 address?
Hope that it is possible! I would be glad for any help! Thanks in advance!