1. Paketinstallation

Die folgenden drei Befehle installieren Unbound, sichern deine DNS-Konfiguration und weisen das System an, den lokalen Resolver zu verwenden:

# zypper install unbound
# cp /etc/resolv.conf /etc/resolv.conf.backup
# echo nameserver 127.0.0.1 > /etc/resolv.conf

2. Lock changes in

Zur Vermeidung unerwünschter Konfigurationsänderungen (z. B. durch den DHCP-Client):

# chattr +i /etc/resolv.conf

3. QNAME minimisation

The latest versions of unbound have qname-minimisation enabled by default. However, it is advisable to verify this setting, as older versions did not enable it automatically.

To check and configure it, open the unbound configuration file, located at /etc/unbound/unbound.conf, look for the following entry and change it if necessary:

server:
    ...
    qname-minimisation: yes
    ...

If the setting is missing, it should still be enabled by default. Der Unbound-Resolver, den du gerade installiert hast, führt auch eine DNSSEC-Validierung durch.

4. Start the service

To enable and start the unbound service, run:

# systemctl enable --now unbound

Wenn du systemd-resolved mit seinem Stub-Listener ausführst, musst du vielleicht etwas mehr tun als nur das. Bitte schau in die resolved.conf manpage.