Setup Unbound with localhost as basic DNS

I’m currently trying to setup Unbound with censor-free 0-logging DNS-Servers. I tried multiple tutorials, but it seems like Unbound is still using my Routers DNS by default and not the specified ones. Since i’m currently on a network with other people and can’t consent the change in the router, i just want to use the Pi with Unbound + Pi-Hole manually with a couple of devices.

In the following the results i observe:

dig @ -p 5353

results in




give me


here are my current unbound configs:

    # If no logfile is specified, syslog is used
    # logfile: "/var/log/unbound/unbound.log"
    verbosity: 0

    port: 5335
    do-ip4: yes
    do-udp: yes
    do-tcp: yes

    # May be set to yes if you have IPv6 connectivity
    do-ip6: yes

    # You want to leave this to no unless you have *native* IPv6. With 6to4 and
    # Terredo tunnels your web browser should favor IPv4 for the same reasons
    prefer-ip6: no

    # Use this only when you downloaded the list of primary root servers!
    # If you use the default dns-root-data package, unbound will find it automatically
    root-hints: "/var/lib/unbound/root.hints"
        # Trust glue only if it is within the server's authority
    harden-glue: yes

    # Require DNSSEC data for trust-anchored zones, if such data is absent, the zone becomes BOGUS
    harden-dnssec-stripped: yes

    # Don't use Capitalization randomization as it known to cause DNSSEC issues sometimes
    # see for further details
    use-caps-for-id: no

    # Reduce EDNS reassembly buffer size.
    # Suggested by the unbound man page to reduce fragmentation reassembly problems
    edns-buffer-size: 1472

    # TTL bounds for cache
    cache-min-ttl: 3600
    cache-max-ttl: 86400

    # Perform prefetching of close to expired message cache entries
    # This only applies to domains that have been frequently queried
        prefetch: yes

    # One thread should be sufficient, can be increased on beefy machines. In reality for most users running on small networks or on a single machine, it should be unnecessary to seek pe$
    num-threads: 1

    # Ensure kernel buffer is large enough to not lose messages in traffic spikes
    so-rcvbuf: 1m

    # Ensure privacy of local IP ranges
    private-address: fd00::/8
    private-address: fe80::/10


  tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt

  name: "."
  forward-tls-upstream: yes
  # Quad9
  forward-addr: 2620:fe::fe@853
  forward-addr: 2620:fe::9@853
  # Cloudflare DNS
  forward-addr: 2606:4700:4700::1111@853
  forward-addr: 2606:4700:4700::1001@853
  # Dismail DNS
  forward-addr: 2a02:c205:3001:4558::1
  forward-addr: 2a01:4f8:c17:739a::2


maybe you like to wait until next DietPi release. There Unbound will become part of dietpi-software catalogue